diff options
author | Evan Martin <martine@danga.com> | 2012-03-13 23:31:39 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-03-13 23:31:39 (GMT) |
commit | 898d2f20f9690a853e4b71e5b223dc18f324508c (patch) | |
tree | 327ac4744cd0c2a2d9ec2ca64638f26451e1a035 /src | |
parent | 475417d0de9540c4507652984d3737eeb45e4007 (diff) | |
parent | 5605009b08b0900353025105c1646f9613f95662 (diff) | |
download | Ninja-898d2f20f9690a853e4b71e5b223dc18f324508c.zip Ninja-898d2f20f9690a853e4b71e5b223dc18f324508c.tar.gz Ninja-898d2f20f9690a853e4b71e5b223dc18f324508c.tar.bz2 |
Merge pull request #249 from qhuo/StatBadPath-Win7
Fix StatBadPath for Windows 7
Diffstat (limited to 'src')
-rw-r--r-- | src/disk_interface_test.cc | 7 |
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) { |