diff options
Diffstat (limited to 'libstdc++-v3/testsuite/experimental/filesystem')
9 files changed, 13 insertions, 23 deletions
diff --git a/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc b/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc index a201415..393fb31 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc @@ -188,7 +188,7 @@ test05() void test06() { -#if !(defined __MINGW32__ || defined __MINGW64__) +#ifndef NO_SYMLINKS auto p = __gnu_test::nonexistent_path(); create_directories(p/"d1/d2"); create_directory_symlink("d1", p/"link"); diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc index ca38328..021897c 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/copy.cc @@ -67,11 +67,7 @@ test01() void test02() { -#if defined(__MINGW32__) || defined(__MINGW64__) - // No symlink support - return; -#endif - +#ifndef NO_SYMLINKS auto from = __gnu_test::nonexistent_path(); std::error_code ec, bad = std::make_error_code(std::errc::invalid_argument); @@ -109,6 +105,7 @@ test02() remove(from, ec); remove(to, ec); +#endif } // Test is_regular_file(f) case. diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc index 03060c6..df27748 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc @@ -147,9 +147,7 @@ test03() void test04() { -#if defined(__MINGW32__) || defined(__MINGW64__) - // no symlinks -#else +#ifndef NO_SYMLINKS // PR libstdc++/101510 // create_directories reports an error if the path is a symlink to a dir std::error_code ec = make_error_code(std::errc::invalid_argument); diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc index 67e5fdd..5e9346d 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directory.cc @@ -69,9 +69,7 @@ test01() VERIFY( e.path1() == f ); } -#if defined(__MINGW32__) || defined(__MINGW64__) - // no symlinks -#else +#ifndef NO_SYMLINKS // PR libstdc++/101510 create_directory on an existing symlink to a directory fs::create_directory(p/"dir"); auto link = p/"link"; diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc index 833aa13..5866e33 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/permissions.cc @@ -72,6 +72,7 @@ test02() void test03() { +#ifndef NO_SYMLINKS using perms = std::experimental::filesystem::perms; __gnu_test::scoped_file f; @@ -95,11 +96,13 @@ test03() VERIFY( ec == ec2 ); remove(p); +#endif } void test04() { +#ifndef NO_SYMLINKS using perms = std::experimental::filesystem::perms; auto p = __gnu_test::nonexistent_path(); @@ -120,6 +123,7 @@ test04() VERIFY( ec == ec2 ); remove(p); +#endif } void diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc index 75dae3e..d0a90976 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/read_symlink.cc @@ -18,7 +18,7 @@ // { dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" } // { dg-do run { target c++11 } } // { dg-require-filesystem-ts "" } -// { dg-xfail-if "symlinks not supported" { *-*-mingw* } } +// { dg-require-target-fs-symlinks "" } #include <experimental/filesystem> #include <testsuite_hooks.h> diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc index c01f140..4ffc740 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove.cc @@ -42,10 +42,7 @@ test01() VERIFY( !ec ); VERIFY( !n ); -#if defined(__MINGW32__) || defined(__MINGW64__) - // No symlink support - return; -#else +#ifndef NO_SYMLINKS auto link = __gnu_test::nonexistent_path(); create_symlink(p, link); // dangling symlink ec = bad_ec; diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc index 4b0ce85..11c07d4 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/remove_all.cc @@ -42,9 +42,7 @@ test01() VERIFY( !ec ); VERIFY( n == 0 ); -#if defined(__MINGW32__) || defined(__MINGW64__) - // No symlink support -#else +#ifndef NO_SYMLINKS auto link = __gnu_test::nonexistent_path(); create_symlink(p, link); // dangling symlink ec = bad_ec; diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/rename.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/rename.cc index 46776e8..37e743b 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/rename.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/rename.cc @@ -75,9 +75,7 @@ test01() void test_symlinks() { -#if defined(__MINGW32__) || defined(__MINGW64__) - // No symlink support -#else +#ifndef NO_SYMLINKS std::error_code ec; const std::error_code bad_ec = make_error_code(std::errc::invalid_argument); |