[libcxx] [test] Fix the fs.op.absolute test to cope with windows paths
authorMartin Storsjö <martin@martin.st>
Wed, 14 Oct 2020 10:16:03 +0000 (13:16 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 3 Nov 2020 07:32:52 +0000 (09:32 +0200)
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

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

index 335ba06..23c18f1 100644 (file)
@@ -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();