diff options
Diffstat (limited to 'src/util_test.cc')
-rw-r--r-- | src/util_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util_test.cc b/src/util_test.cc index 4b4c760..87b614c 100644 --- a/src/util_test.cc +++ b/src/util_test.cc @@ -53,3 +53,11 @@ TEST(CanonicalizePath, PathSamples) { EXPECT_EQ("can't canonicalize path './x/../foo/../../bar.h' that reaches " "above its directory", err); } + +TEST(CanonicalizePath, AbsolutePath) { + string path = "/usr/include/stdio.h"; + string err = ""; + EXPECT_TRUE(CanonicalizePath(&path, &err)); + EXPECT_EQ("", err); + EXPECT_EQ("/usr/include/stdio.h", path); +} |