summaryrefslogtreecommitdiffstats
path: root/src/util_test.cc
diff options
context:
space:
mode:
authorPavel Boldin <pboldin@cloudlinux.com>2024-03-15 15:21:16 (GMT)
committerPavel Boldin <boldin.pavel@gmail.com>2024-03-16 16:08:06 (GMT)
commite5413d3cc13a3a9de0b8ca6faadb813270687cba (patch)
tree006b2f7cf5e4ce17feabc986ffe699a49559b347 /src/util_test.cc
parentab510c7a8cccbea0ea2c82531dc23893b551d55e (diff)
downloadNinja-e5413d3cc13a3a9de0b8ca6faadb813270687cba.zip
Ninja-e5413d3cc13a3a9de0b8ca6faadb813270687cba.tar.gz
Ninja-e5413d3cc13a3a9de0b8ca6faadb813270687cba.tar.bz2
CanonicalizePath: fix 'a/b/.._foo' -> 'a' replacement
Signed-off-by: Pavel Boldin <pboldin@cloudlinux.com>
Diffstat (limited to 'src/util_test.cc')
-rw-r--r--src/util_test.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util_test.cc b/src/util_test.cc
index 8467e2a..d76954c 100644
--- a/src/util_test.cc
+++ b/src/util_test.cc
@@ -152,6 +152,10 @@ TEST(CanonicalizePath, PathSamples) {
path = "foo/..";
CanonicalizePath(&path);
EXPECT_EQ(".", path);
+
+ path = "foo/.._bar";
+ CanonicalizePath(&path);
+ EXPECT_EQ("foo/.._bar", path);
}
#ifdef _WIN32