diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2012-02-05 12:28:56 (GMT) |
---|---|---|
committer | Nicolas Despres <nicolas.despres@gmail.com> | 2012-02-20 02:08:04 (GMT) |
commit | 7cfd19e1d4c5d16b1cc58afd9da5a2be246677b3 (patch) | |
tree | 363bfe8a3c9f6e821b742ec6cb2cf45e373af7a4 /src | |
parent | 0eebd5fe1dec021a63110ecab8fa411f9980745f (diff) | |
download | Ninja-7cfd19e1d4c5d16b1cc58afd9da5a2be246677b3.zip Ninja-7cfd19e1d4c5d16b1cc58afd9da5a2be246677b3.tar.gz Ninja-7cfd19e1d4c5d16b1cc58afd9da5a2be246677b3.tar.bz2 |
Add a test for empty path in CanonicalizePath().
This test covers bug fix introduced by 62e9139740. However,
reverting this patch does not trigger a test failure. Maybe, I am
not testing on the right platform (Linux). Anyway, in all cases
I think this test deserves to be added.
Diffstat (limited to 'src')
-rw-r--r-- | src/util_test.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util_test.cc b/src/util_test.cc index 5b6b164..f7ccf00 100644 --- a/src/util_test.cc +++ b/src/util_test.cc @@ -64,6 +64,9 @@ TEST(CanonicalizePath, EmptyResult) { string path; string err; + EXPECT_FALSE(CanonicalizePath(&path, &err)); + EXPECT_EQ("empty path", err); + path = "."; EXPECT_FALSE(CanonicalizePath(&path, &err)); EXPECT_EQ("path canonicalizes to the empty path", err); |