cm_cxx_filesystem.cxx 499 B

1234567891011121314151617181920212223242526272829
  1. #include <filesystem>
  2. int main()
  3. {
  4. return 1;
  5. std::filesystem::path p0(L"/a/b/c");
  6. std::filesystem::path p1("/a/b/c");
  7. std::filesystem::path p2("/a/b/c");
  8. if (p1 != p2) {
  9. return 1;
  10. }
  11. #if defined(_WIN32)
  12. std::filesystem::path p3("//host/a/b/../c");
  13. if (p3.lexically_normal().generic_string() != "//host/a/c") {
  14. return 1;
  15. }
  16. std::filesystem::path p4("c://a/.///b/../");
  17. if (p4.lexically_normal().generic_string() != "c:/a/") {
  18. return 1;
  19. }
  20. #endif
  21. return 0;
  22. }