public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Adjust Filesystem TS test for Windows
@ 2022-02-08 14:01 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2022-02-08 14:01 UTC (permalink / raw)
  To: libstdc++, gcc-patches

Tested x86_64-linux and x86_64-w64-mingw, pushed to trunk.


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.
---
 .../filesystem/operations/create_directories.cc   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

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);
 }
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-08 14:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 14:01 [committed] libstdc++: Adjust Filesystem TS test for Windows Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).