[libcxx-commits] [libcxx] 321f696 - [libcxx] [test] Fix the fs.op.absolute test to cope with windows paths

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 2 23:33:26 PST 2020


Author: Martin Storsjö
Date: 2020-11-03T09:32:52+02:00
New Revision: 321f696920630be1b3c93e2a8b965c624ddd646c

URL: https://github.com/llvm/llvm-project/commit/321f696920630be1b3c93e2a8b965c624ddd646c
DIFF: https://github.com/llvm/llvm-project/commit/321f696920630be1b3c93e2a8b965c624ddd646c.diff

LOG: [libcxx] [test] Fix the fs.op.absolute test to cope with windows paths

Prepend the root path on the already_absolute testcase, and construct
a path ending with the preferred separator for the test reference for
"foo/".

Differential Revision: https://reviews.llvm.org/D89944

Added: 
    

Modified: 
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
index 335ba06b64aa..23c18f1e689d 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
@@ -42,8 +42,8 @@ TEST_CASE(basic_test)
     } TestCases [] = {
         {"", cwd / ""},
         {"foo", cwd / "foo"},
-        {"foo/", cwd / "foo/"},
-        {"/already_absolute", "/already_absolute"}
+        {"foo/", cwd / "foo" / ""},
+        {"/already_absolute", cwd.root_path() / "already_absolute"}
     };
     for (auto& TC : TestCases) {
         std::error_code ec = GetTestEC();


        


More information about the libcxx-commits mailing list