public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r11-9771] libstdc++: Adjust Filesystem TS test for Windows
Date: Mon,  4 Apr 2022 11:47:31 +0000 (GMT)	[thread overview]
Message-ID: <20220404114731.70B183858010@sourceware.org> (raw)

https://gcc.gnu.org/g:cd0312e8af92f1e3bab164618f7f170c3be44d5b

commit r11-9771-gcd0312e8af92f1e3bab164618f7f170c3be44d5b
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Feb 8 12:45:46 2022 +0000

    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.
    
    (cherry picked from commit 61b783995fac5355827ada1f8544052119a23606)

Diff:
---
 .../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 fc134ad64a3..aa47487e71a 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);
 }


                 reply	other threads:[~2022-04-04 11:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220404114731.70B183858010@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).