summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/disk_interface_test.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/disk_interface_test.cc b/src/disk_interface_test.cc
index 67e2a04..9e460c5 100644
--- a/src/disk_interface_test.cc
+++ b/src/disk_interface_test.cc
@@ -61,10 +61,13 @@ TEST_F(DiskInterfaceTest, StatMissingFile) {
}
TEST_F(DiskInterfaceTest, StatBadPath) {
- // To test the error code path, use an overlong file name.
- // Both Windows and Linux appear to object to this.
+#ifdef _WIN32
+ string bad_path("cc:\\foo");
+ EXPECT_EQ(-1, disk_.Stat(bad_path));
+#else
string too_long_name(512, 'x');
EXPECT_EQ(-1, disk_.Stat(too_long_name));
+#endif
}
TEST_F(DiskInterfaceTest, StatExistingFile) {