summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-02-08 12:45:46 +0000
committerJonathan Wakely <jwakely@redhat.com>2022-02-08 13:31:09 +0000
commit61b783995fac5355827ada1f8544052119a23606 (patch)
treeba42e47a27c1019ebb92f80c188c953d35f4447f
parent5750952bec1e632d1f804f4a1bed2f74c0f3b189 (diff)
libstdc++: Adjust Filesystem TS test for Windows
The Filesystem TS isn't really supported for Windows, but the FAIL for this test is just because it doesn't match what happens on Windows. libstdc++-v3/ChangeLog: * testsuite/experimental/filesystem/operations/create_directories.cc: Adjust expected results for Windows.
-rw-r--r--libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
index 8cdc7030441..03060c6cbb3 100644
--- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
+++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc
@@ -108,8 +108,15 @@ test02()
VERIFY( !result );
VERIFY( ec == std::errc::not_a_directory );
result = create_directories(file.path/"../bar", ec);
+#if defined(__MINGW32__) || defined(__MINGW64__)
+ VERIFY( result );
+ VERIFY( !ec );
+ VERIFY( is_directory(dir.path/"bar") );
+ remove(dir.path/"bar");
+#else
VERIFY( !result );
VERIFY( ec );
+#endif
}
}
@@ -120,11 +127,19 @@ test03()
const auto p = __gnu_test::nonexistent_path() / "/";
bool result = create_directories(p);
VERIFY( result );
+#if defined(__MINGW32__) || defined(__MINGW64__)
+ VERIFY( exists(p/".") ); // needed due to PR libstdc++/88881
+#else
VERIFY( exists(p) );
+#endif
remove(p);
result = create_directories(p/"foo/");
VERIFY( result );
+#if defined(__MINGW32__) || defined(__MINGW64__)
+ VERIFY( exists(p/".") ); // needed due to PR libstdc++/88881
+#else
VERIFY( exists(p) );
+#endif
VERIFY( exists(p/"foo") );
remove_all(p);
}