[libcxx-commits] [PATCH] D98988: [libcxx] [test] Fix fs.op.proximate for windows

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 22 07:51:35 PDT 2021

Quuxplusone accepted this revision.
Quuxplusone added a comment.
This revision is now accepted and ready to land.

LGTM % comments.

Comment at: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp:91
       {"//base", "a", dot_dot_to_root / "../base"},
       {"a", "a", "."},
There's no subtle difference between `//base` and `//foo`, right? I wish this test'd use `//foo` here.

Also, please add these tests, of which all but two I would say are "missing" right now on Windows. (On POSIX they should be basically duplicates of existing tests, but we might as well test the expected output on POSIX as well.)
{"//foo/a", "//bar", "//foo/a"}
{"//foo/a", "//bar/", "//foo/a"}
{"//foo/a", "b", "//foo/a"}  // already tested
{"//foo/a", "/b", "//foo/a"}
{"//foo/a", "//bar/b", "//foo/a"}  // already tested
And these Windows-only tests using drive letters, because this is the only way to get a path with a root-name but no root-path, right?
{"C:/a", "C:/b", "../a"}
{"C:/a", "C:b", "/a"} // ??? my best guess
{"C:/a", "D:/a", "C:/a"}
{"C:/a", "D:/b", "C:/a"}
{"C:/a", "D:b", "C:/a"}
{"C:a", "C:/b", "C:a"}
{"C:a", "C:b", "C:a"}
{"C:a", "D:/a", "C:a"}
{"C:a", "D:/b", "C:a"}
{"C:a", "D:b", "C:a"}

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list