[libc++] Expand the contents of LIBCXX_ENABLE_FILESYSTEM
Since LIBCXX_ENABLE_FILESYSTEM now truly represents whether the
platform supports a filesystem (as opposed to whether the <filesystem>
library is provided), we can provide a few additional classes from
the <filesystem> library even when the platform does not have support
for a filesystem. For example, this allows performing path manipulations
using std::filesystem::path even on platforms where there is no actual
filesystem.
rdar://107061236
Differential Revision: https://reviews.llvm.org/D152382
GitOrigin-RevId: c352fa7407122ee62d990d6b82551650149f98d4
diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst
index 6f6e098..95126c8 100644
--- a/docs/ReleaseNotes.rst
+++ b/docs/ReleaseNotes.rst
@@ -67,6 +67,10 @@
in the specialization has not been implemented in libc++. This prevents the
feature-test macro to be set.
+- Platforms that don't have support for a filesystem can now still take advantage of some parts of ``<filesystem>``.
+ Anything that does not rely on having an actual filesystem available will now work, such as ``std::filesystem::path``,
+ ``std::filesystem::perms`` and similar classes.
+
Deprecations and Removals
-------------------------
diff --git a/include/__filesystem/copy_options.h b/include/__filesystem/copy_options.h
index 11ac9ab..11962e4 100644
--- a/include/__filesystem/copy_options.h
+++ b/include/__filesystem/copy_options.h
@@ -21,8 +21,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
enum class _LIBCPP_ENUM_VIS copy_options : unsigned short {
none = 0,
skip_existing = 1,
@@ -75,8 +73,6 @@
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/include/__filesystem/directory_entry.h b/include/__filesystem/directory_entry.h
index 2086d82..bb7a061 100644
--- a/include/__filesystem/directory_entry.h
+++ b/include/__filesystem/directory_entry.h
@@ -35,13 +35,12 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#ifndef _LIBCPP_CXX03_LANG
+#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
class directory_entry {
typedef _VSTD_FS::path _Path;
@@ -520,7 +519,7 @@
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#endif // _LIBCPP_CXX03_LANG
+#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_POP_MACROS
diff --git a/include/__filesystem/directory_iterator.h b/include/__filesystem/directory_iterator.h
index 5d6b616..903fe23 100644
--- a/include/__filesystem/directory_iterator.h
+++ b/include/__filesystem/directory_iterator.h
@@ -29,7 +29,7 @@
# pragma GCC system_header
#endif
-#ifndef _LIBCPP_CXX03_LANG
+#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
@@ -164,6 +164,6 @@
#endif // _LIBCPP_STD_VER >= 20
-#endif // _LIBCPP_CXX03_LANG
+#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
#endif // _LIBCPP___FILESYSTEM_DIRECTORY_ITERATOR_H
diff --git a/include/__filesystem/directory_options.h b/include/__filesystem/directory_options.h
index 406bb10..4c323cc 100644
--- a/include/__filesystem/directory_options.h
+++ b/include/__filesystem/directory_options.h
@@ -21,8 +21,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
enum class _LIBCPP_ENUM_VIS directory_options : unsigned char {
none = 0,
follow_directory_symlink = 1,
@@ -73,8 +71,6 @@
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/include/__filesystem/file_status.h b/include/__filesystem/file_status.h
index 47e28b4..0cf405b 100644
--- a/include/__filesystem/file_status.h
+++ b/include/__filesystem/file_status.h
@@ -23,8 +23,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
class _LIBCPP_EXPORTED_FROM_ABI file_status {
public:
// constructors
@@ -71,8 +69,6 @@
perms __prms_;
};
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/include/__filesystem/filesystem_error.h b/include/__filesystem/filesystem_error.h
index 81db9cc..713cc35 100644
--- a/include/__filesystem/filesystem_error.h
+++ b/include/__filesystem/filesystem_error.h
@@ -70,22 +70,19 @@
shared_ptr<_Storage> __storage_;
};
-// TODO(ldionne): We need to pop the pragma and push it again after
-// filesystem_error to work around PR41078.
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
template <class... _Args>
-_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_filesystem_error(_Args&&... __args) {
+_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY void
+__throw_filesystem_error(_Args&&... __args) {
throw filesystem_error(_VSTD::forward<_Args>(__args)...);
}
# else
template <class... _Args>
-_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_filesystem_error(_Args&&...) {
+_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY void
+__throw_filesystem_error(_Args&&...) {
_LIBCPP_VERBOSE_ABORT("filesystem_error was thrown in -fno-exceptions mode");
}
# endif
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/include/__filesystem/operations.h b/include/__filesystem/operations.h
index 85c8a87..71b3fb8 100644
--- a/include/__filesystem/operations.h
+++ b/include/__filesystem/operations.h
@@ -28,7 +28,7 @@
# pragma GCC system_header
#endif
-#ifndef _LIBCPP_CXX03_LANG
+#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
@@ -196,6 +196,6 @@
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#endif // _LIBCPP_CXX03_LANG
+#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
#endif // _LIBCPP___FILESYSTEM_OPERATIONS_H
diff --git a/include/__filesystem/path_iterator.h b/include/__filesystem/path_iterator.h
index 3d445df..60ab318 100644
--- a/include/__filesystem/path_iterator.h
+++ b/include/__filesystem/path_iterator.h
@@ -27,8 +27,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
class _LIBCPP_EXPORTED_FROM_ABI path::iterator {
public:
enum _ParserState : unsigned char {
@@ -114,19 +112,19 @@
_ParserState __state_;
};
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline _LIBCPP_INLINE_VISIBILITY bool operator==(const path::iterator& __lhs,
const path::iterator& __rhs) {
return __lhs.__path_ptr_ == __rhs.__path_ptr_ &&
__lhs.__entry_.data() == __rhs.__entry_.data();
}
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const path::iterator& __lhs,
const path::iterator& __rhs) {
return !(__lhs == __rhs);
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/include/__filesystem/perm_options.h b/include/__filesystem/perm_options.h
index 5b7dbd6..e77af9e 100644
--- a/include/__filesystem/perm_options.h
+++ b/include/__filesystem/perm_options.h
@@ -21,8 +21,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
enum class _LIBCPP_ENUM_VIS perm_options : unsigned char {
replace = 1,
add = 2,
@@ -68,8 +66,6 @@
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/include/__filesystem/perms.h b/include/__filesystem/perms.h
index dd22d56..77bc652 100644
--- a/include/__filesystem/perms.h
+++ b/include/__filesystem/perms.h
@@ -21,8 +21,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
// On Windows, these permission bits map to one single readonly flag per
// file, and the executable bit is always returned as set. When setting
// permissions, as long as the write bit is set for either owner, group or
@@ -86,8 +84,6 @@
_LIBCPP_INLINE_VISIBILITY
inline perms& operator^=(perms& __lhs, perms __rhs) { return __lhs = __lhs ^ __rhs; }
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/include/__filesystem/recursive_directory_iterator.h b/include/__filesystem/recursive_directory_iterator.h
index b079d6e..c38d58e 100644
--- a/include/__filesystem/recursive_directory_iterator.h
+++ b/include/__filesystem/recursive_directory_iterator.h
@@ -28,7 +28,7 @@
# pragma GCC system_header
#endif
-#ifndef _LIBCPP_CXX03_LANG
+#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
@@ -178,6 +178,6 @@
#endif // _LIBCPP_STD_VER >= 20
-#endif // _LIBCPP_CXX03_LANG
+#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
#endif // _LIBCPP___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H
diff --git a/include/__filesystem/space_info.h b/include/__filesystem/space_info.h
index e125813..929f514 100644
--- a/include/__filesystem/space_info.h
+++ b/include/__filesystem/space_info.h
@@ -22,8 +22,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
-
struct _LIBCPP_EXPORTED_FROM_ABI space_info {
uintmax_t capacity;
uintmax_t free;
@@ -34,8 +32,6 @@
# endif
};
-_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/include/filesystem b/include/filesystem
index dfbf7ce..99ba713 100644
--- a/include/filesystem
+++ b/include/filesystem
@@ -558,10 +558,6 @@
// [fs.filesystem.syn]
#include <compare>
-#if defined(_LIBCPP_HAS_NO_FILESYSTEM)
-# error "The <filesystem> library is not supported since libc++ has been configured without support for a filesystem."
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/include/fstream b/include/fstream
index 7119c79..837f672 100644
--- a/include/fstream
+++ b/include/fstream
@@ -189,15 +189,12 @@
#include <__utility/swap.h>
#include <__utility/unreachable.h>
#include <cstdio>
+#include <filesystem>
#include <istream>
#include <ostream>
#include <typeinfo>
#include <version>
-#if !defined(_LIBCPP_HAS_NO_FILESYSTEM)
-# include <filesystem>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
diff --git a/include/module.modulemap.in b/include/module.modulemap.in
index d49e339..4dff9f2 100644
--- a/include/module.modulemap.in
+++ b/include/module.modulemap.in
@@ -911,6 +911,7 @@
private header "__filesystem/path.h"
export functional.__functional.hash
export functional.__functional.unary_function
+ export string
}
module path_iterator { private header "__filesystem/path_iterator.h" }
module perm_options { private header "__filesystem/perm_options.h" }
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9562d99..f782d85 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -12,6 +12,10 @@
condition_variable.cpp
condition_variable_destructor.cpp
exception.cpp
+ filesystem/filesystem_clock.cpp
+ filesystem/filesystem_error.cpp
+ filesystem/path_parser.h
+ filesystem/path.cpp
functional.cpp
future.cpp
hash.cpp
@@ -113,11 +117,7 @@
filesystem/directory_entry.cpp
filesystem/directory_iterator.cpp
filesystem/file_descriptor.h
- filesystem/filesystem_clock.cpp
- filesystem/filesystem_error.cpp
filesystem/operations.cpp
- filesystem/path_parser.h
- filesystem/path.cpp
filesystem/posix_compat.h
filesystem/time_utils.h
)
diff --git a/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp b/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp
index 02df694..d77d537 100644
--- a/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp
+++ b/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp
@@ -5,6 +5,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
+
// <fstream>
// template <class charT, class traits = char_traits<charT> >
diff --git a/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp b/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp
index e581963..beef2c5 100644
--- a/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp
+++ b/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
+// UNSUPPORTED: no-filesystem
// ADDITIONAL_COMPILE_FLAGS: -I %S/../../../../../../src
// This test relies on calling functions from the libcxx internal headers
diff --git a/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp b/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp
index a9ed30c..d672566 100644
--- a/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp
+++ b/test/libcxx/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// These tests require locale for non-char paths
// UNSUPPORTED: no-localization
@@ -24,11 +25,11 @@
#include <type_traits>
#include <cassert>
-#include "test_macros.h"
-#include "test_iterators.h"
#include "count_new.h"
+#include "make_string.h"
#include "min_allocator.h"
-#include "filesystem_test_helper.h"
+#include "test_iterators.h"
+#include "test_macros.h"
// the SSO is always triggered for strings of size 2.
diff --git a/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp b/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp
index 2d057cb..7b81c7f 100644
--- a/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp
+++ b/test/libcxx/input.output/filesystems/convert_file_time.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/libcxx/input.output/filesystems/lit.local.cfg b/test/libcxx/input.output/filesystems/lit.local.cfg
deleted file mode 100644
index df91de1..0000000
--- a/test/libcxx/input.output/filesystems/lit.local.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-# Load the same local configuration as the filesystem tests in libcxx/test/std
-import os
-
-std_filesystem_tests = os.path.join(
- config.test_source_root, "std", "input.output", "filesystems"
-)
-config.load_from_path(os.path.join(std_filesystem_tests, "lit.local.cfg"), lit_config)
diff --git a/test/libcxx/transitive_includes.gen.py b/test/libcxx/transitive_includes.gen.py
index 13f897b..c446cef 100644
--- a/test/libcxx/transitive_includes.gen.py
+++ b/test/libcxx/transitive_includes.gen.py
@@ -63,8 +63,8 @@
//--- {header}.sh.cpp
{lit_header_restrictions.get(header, '')}
-// TODO: Fix this test to make it work with filesystem, localization or wide characters disabled
-// UNSUPPORTED{BLOCKLIT}: no-filesystem, no-localization, no-wide-characters
+// TODO: Fix this test to make it work with localization or wide characters disabled
+// UNSUPPORTED{BLOCKLIT}: no-localization, no-wide-characters
// When built with modules, this test doesn't work because --trace-includes doesn't
// report the stack of includes correctly.
diff --git a/test/std/containers/iterator.rel_ops.compile.pass.cpp b/test/std/containers/iterator.rel_ops.compile.pass.cpp
index 9898880..aaaa887 100644
--- a/test/std/containers/iterator.rel_ops.compile.pass.cpp
+++ b/test/std/containers/iterator.rel_ops.compile.pass.cpp
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: no-filesystem
// XFAIL: availability-filesystem-missing
// Make sure the various containers' iterators are not broken by the use of `std::rel_ops`.
@@ -15,6 +14,7 @@
#include <array>
#include <deque>
+#include <filesystem>
#include <forward_list>
#include <list>
#include <map>
@@ -26,10 +26,6 @@
#include "test_macros.h"
-#if TEST_STD_VER >= 11
-#include "filesystem_include.h"
-#endif
-
#if TEST_STD_VER >= 17
#include <string_view>
#endif
@@ -115,16 +111,18 @@
template void test_forward<std::unordered_set<int> >();
template void test_random_access<std::vector<int> >();
-#if TEST_STD_VER >= 11
+#if TEST_STD_VER >= 17
void test_directory_iterators() {
- fs::directory_iterator it;
+#ifndef TEST_HAS_NO_FILESYSTEM
+ std::filesystem::directory_iterator it;
test_eq(it, it);
- fs::recursive_directory_iterator rdit;
+ std::filesystem::recursive_directory_iterator rdit;
test_eq(rdit, rdit);
+#endif
}
-template void test_forward<fs::path>();
+template void test_forward<std::filesystem::path>();
#endif
#if TEST_STD_VER >= 17
diff --git a/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp b/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp
index 322787b..ece52da 100644
--- a/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp b/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp
index 84c4197..bc75d04 100644
--- a/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp b/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp
index e051099..021efc4 100644
--- a/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp b/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp
index a055c66..dccef75 100644
--- a/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp b/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp
index 11f84c8..cbe8fd4 100644
--- a/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp b/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
index 700247d..7e31e29 100644
--- a/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp b/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp
index f150cfa..1bb964a 100644
--- a/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/input.output/filesystems/lit.local.cfg b/test/std/input.output/filesystems/class.directory_entry/lit.local.cfg
similarity index 100%
rename from test/std/input.output/filesystems/lit.local.cfg
rename to test/std/input.output/filesystems/class.directory_entry/lit.local.cfg
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp
index d37053a..2ce496f 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp
index c1f96e1..390d0bf 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/copy_assign.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
index 67a0703..d25d85d 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/ctor.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp
index c9dcc65..85bc515 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/default_ctor.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/equal.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/equal.pass.cpp
index 5299eb0..ef2f6b8 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/equal.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/equal.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp
index ca83031..5669249 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp
index a1f730e..bbf758f 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp
index 636c54b..ac4a203 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/move_assign.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp
index 44cde7e..2ae9331 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp
index d76e138..825d800 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// directory_iterator, recursive_directory_iterator
diff --git a/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp
index 4529d87..37823d2 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// directory_iterator
diff --git a/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp b/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp
index 403d1ae..daef7ce 100644
--- a/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp
+++ b/test/std/input.output/filesystems/class.directory_iterator/types.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp b/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp
index 8fd23b6..f63bc03 100644
--- a/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp
+++ b/test/std/input.output/filesystems/class.filesystem_error/filesystem_error.members.pass.cpp
@@ -6,6 +6,7 @@
//
//===----------------------------------------------------------------------===//
+// UNSUPPORTED: availability-filesystem-missing
// UNSUPPORTED: c++03
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp b/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp
index cff339a..5e3b2e7 100644
--- a/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -24,7 +25,36 @@
#include <type_traits>
#include "test_macros.h"
-#include "filesystem_test_helper.h"
+
+template <class Iter1, class Iter2>
+bool checkCollectionsEqual(
+ Iter1 start1, Iter1 const end1
+ , Iter2 start2, Iter2 const end2
+ )
+{
+ while (start1 != end1 && start2 != end2) {
+ if (*start1 != *start2) {
+ return false;
+ }
+ ++start1; ++start2;
+ }
+ return (start1 == end1 && start2 == end2);
+}
+
+template <class Iter1, class Iter2>
+bool checkCollectionsEqualBackwards(
+ Iter1 const start1, Iter1 end1
+ , Iter2 const start2, Iter2 end2
+ )
+{
+ while (start1 != end1 && start2 != end2) {
+ --end1; --end2;
+ if (*end1 != *end2) {
+ return false;
+ }
+ }
+ return (start1 == end1 && start2 == end2);
+}
void checkIteratorConcepts() {
using namespace fs;
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
index afbad4c..6af9fc5 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// These tests require locale for non-char paths
// UNSUPPORTED: no-localization
@@ -33,11 +34,11 @@
// to an intermediate path object, causing allocations in cases where no
// allocations are done on other platforms.
-#include "test_macros.h"
-#include "test_iterators.h"
+#include "../path_helper.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
-
+#include "make_string.h"
+#include "test_iterators.h"
+#include "test_macros.h"
struct AppendOperatorTestcase {
MultiStringType lhs;
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp
index 9044b2f..ba411fc 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.assign/copy.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp
index 95ac502..bbc3754 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.assign/move.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp
index 68c2442..93f8221 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// These tests require locale for non-char paths
// UNSUPPORTED: no-localization
@@ -32,10 +33,11 @@
// On Windows, charset conversions cause allocations in the path class in
// cases where no allocations are done on other platforms.
-#include "test_macros.h"
-#include "test_iterators.h"
+#include "../../path_helper.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
+#include "make_string.h"
+#include "test_iterators.h"
+#include "test_macros.h"
template <class CharT>
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp
index cf27cd2..0be30c4 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp
@@ -8,6 +8,7 @@
// UNSUPPORTED: no-localization
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
// <filesystem>
@@ -37,7 +38,10 @@
#include <cassert>
#include "test_macros.h"
-#include "filesystem_test_helper.h"
+
+#ifdef _WIN32
+# include <windows.h> // SetFileApisToANSI & friends
+#endif
// Test conversion with strings that fit within the latin1 charset, that fit
// within one code point in UTF-16, and that can be expressible in certain
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
index e1d78de..2bea512 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -28,15 +29,16 @@
// template<> struct hash<filesystem::path>;
#include "filesystem_include.h"
+#include <cassert>
+#include <string>
#include <type_traits>
#include <vector>
-#include <cassert>
-#include "test_macros.h"
+#include "assert_macros.h"
+#include "count_new.h"
#include "test_comparisons.h"
#include "test_iterators.h"
-#include "count_new.h"
-#include "filesystem_test_helper.h"
+#include "test_macros.h"
struct PathCompareTest {
const char* LHS;
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
index 5c0fb20..dcb7fc8 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// These tests require locale for non-char paths
// UNSUPPORTED: no-localization
@@ -39,10 +40,11 @@
// On Windows, charset conversions cause allocations in the path class in
// cases where no allocations are done on other platforms.
-#include "test_macros.h"
-#include "test_iterators.h"
+#include "../path_helper.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
+#include "make_string.h"
+#include "test_iterators.h"
+#include "test_macros.h"
struct ConcatOperatorTestcase {
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp
index 1155b7c..dbd603e 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.construct/copy.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp
index 9ea9c2e..40b7667 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.construct/default.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp
index 541f644..8a3aff8 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.construct/move.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp
index f119f34..39a69a3 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.construct/source.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// These tests require locale for non-char paths
// UNSUPPORTED: no-localization
@@ -25,10 +26,11 @@
#include <type_traits>
#include <cassert>
-#include "test_macros.h"
-#include "test_iterators.h"
+#include "../../path_helper.h"
+#include "make_string.h"
#include "min_allocator.h"
-#include "filesystem_test_helper.h"
+#include "test_iterators.h"
+#include "test_macros.h"
template <class CharT, class ...Args>
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp b/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp
index 32bbc4c..39d8812 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.decompose/empty.verify.cpp
@@ -13,6 +13,7 @@
// bool empty() const noexcept;
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: availability-filesystem-missing
#include "filesystem_include.h"
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp
index 3d80cc4..584e657 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.decompose/path.decompose.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -48,13 +49,13 @@
#include <cassert>
#include <cstddef>
#include <iterator>
+#include <string>
#include <type_traits>
#include <vector>
#include "test_macros.h"
#include "test_iterators.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
struct ComparePathExact {
bool operator()(fs::path const& LHS, std::string const& RHS) const {
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
index a3454ef..bb25daf 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -18,9 +19,9 @@
#include <cstdio>
#include <string>
-#include "test_macros.h"
+#include "../../path_helper.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
+#include "test_macros.h"
int main(int, char**) {
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
index 127cc7f..7dae87d 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -19,10 +20,9 @@
#include <cstdio>
#include <string>
-#include "test_macros.h"
+#include "../../path_helper.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
-
+#include "test_macros.h"
int main(int, char**) {
// clang-format off
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp
index d67fc85..04776dc 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// These tests require locale for non-char paths
// UNSUPPORTED: no-localization
@@ -21,18 +22,19 @@
// generic_string(const Allocator& a = Allocator()) const;
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
-#include "test_macros.h"
-#include "test_iterators.h"
#include "count_new.h"
+#include "make_string.h"
#include "min_allocator.h"
-#include "filesystem_test_helper.h"
+#include "test_iterators.h"
+#include "test_macros.h"
+
MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
-
// generic_string<C, T, A> forwards to string<C, T, A>. Tests for
// string<C, T, A>() are in "path.native.obs/string_alloc.pass.cpp".
// generic_string is minimally tested here.
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp
index f381fb5..7634c4d 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/named_overloads.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// These tests require locale for non-char paths
// UNSUPPORTED: no-localization
@@ -23,14 +24,15 @@
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
-#include "test_macros.h"
-#include "test_iterators.h"
#include "count_new.h"
+#include "make_string.h"
#include "min_allocator.h"
-#include "filesystem_test_helper.h"
+#include "test_iterators.h"
+#include "test_macros.h"
MultiStringType input = MKSTR("c:\\foo\\bar");
#ifdef _WIN32
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp
index bc1db87..f328c2d 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.hash_enabled.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp
index 9a68e18..ca25753 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/clear.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -15,13 +16,12 @@
// void clear() noexcept
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <type_traits>
-#include "test_macros.h"
-#include "test_iterators.h"
+#include "assert_macros.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
+#include "test_iterators.h"
int main(int, char**) {
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp
index da505d6..9cd0717 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/make_preferred.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -15,13 +16,12 @@
// path& make_preferred()
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
-#include "test_macros.h"
#include "test_iterators.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
struct MakePreferredTestcase {
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp
index 324d0dc..0985a92 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -18,10 +19,8 @@
#include <type_traits>
#include <cassert>
-#include "test_macros.h"
#include "test_iterators.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
struct RemoveFilenameTestcase {
const char* value;
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp
index f77f3d9..9408b25 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_extension.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -15,13 +16,12 @@
// path& replace_extension(path const& p = path())
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
-#include "test_macros.h"
-#include "test_iterators.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
+#include "test_iterators.h"
struct ReplaceExtensionTestcase {
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
index 83ca785..425a400 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -15,13 +16,12 @@
// path& replace_filename( const path& replacement );
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
-#include "test_macros.h"
#include "test_iterators.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
struct ReplaceFilenameTestcase {
const char* value;
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp
index 5039563..967eeb9 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.modifiers/swap.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -15,13 +16,12 @@
// void swap(path& rhs) noexcept;
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <type_traits>
-#include "test_macros.h"
-#include "test_iterators.h"
+#include "assert_macros.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
+#include "test_iterators.h"
struct SwapTestcase {
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp
index c6574d0..eddad65 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.native.obs/c_str.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -16,16 +17,15 @@
// const value_type* c_str() const noexcept;
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
#include "assert_macros.h"
#include "test_macros.h"
-#include "filesystem_test_helper.h"
-int main(int, char**)
-{
+int main(int, char**) {
using namespace fs;
const char* const value = "hello world";
const std::string str_value = value;
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp
index 0811e90..18d4d2b 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.native.obs/named_overloads.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// These tests require locale for non-char paths
// UNSUPPORTED: no-localization
@@ -23,14 +24,16 @@
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
-#include "test_macros.h"
-#include "test_iterators.h"
+#include "assert_macros.h"
#include "count_new.h"
+#include "make_string.h"
#include "min_allocator.h"
-#include "filesystem_test_helper.h"
+#include "test_iterators.h"
+#include "test_macros.h"
MultiStringType longString = MKSTR("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/123456789/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp
index 2d41fc1..fe12ea3 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.native.obs/native.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -15,15 +16,15 @@
// const string_type& native() const noexcept;
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
+#include "assert_macros.h"
#include "test_macros.h"
-#include "filesystem_test_helper.h"
-int main(int, char**)
-{
+int main(int, char**) {
using namespace fs;
const char* const value = "hello world";
std::string value_str(value);
diff --git a/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp b/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp
index 70a36f2..18bcfc7 100644
--- a/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.member/path.native.obs/operator_string.pass.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -16,15 +17,15 @@
// operator string_type() const;
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
+#include "assert_macros.h"
#include "test_macros.h"
-#include "filesystem_test_helper.h"
-int main(int, char**)
-{
+int main(int, char**) {
using namespace fs;
using string_type = path::string_type;
const char* const value = "hello world";
diff --git a/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp b/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp
index 6a44722..f5e2ddc 100644
--- a/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp
+++ b/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp b/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp
index 57e8301..0949c8b 100644
--- a/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -17,11 +18,9 @@
#include <cassert>
#include "test_macros.h"
-#include "filesystem_test_helper.h"
// This is mainly tested via the member append functions.
-int main(int, char**)
-{
+int main(int, char**) {
using namespace fs;
path p1("abc");
path p2("def");
diff --git a/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp b/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp
index e8eb1bc..504a238 100644
--- a/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp
+++ b/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp
@@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
-
#include "filesystem_include.h"
using namespace fs;
diff --git a/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp b/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
index be502a7..a77b212 100644
--- a/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
@@ -8,6 +8,7 @@
// UNSUPPORTED: c++03
// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -17,13 +18,13 @@
// path u8path(InputIter, InputIter);
#include "filesystem_include.h"
-#include <type_traits>
#include <cassert>
+#include <string>
+#include <type_traits>
#include "test_macros.h"
#include "test_iterators.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
int main(int, char**)
diff --git a/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp b/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp
index 2f21649..4b95b68 100644
--- a/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.nonmember/path.io.pass.cpp
@@ -8,6 +8,7 @@
// UNSUPPORTED: c++03
// UNSUPPORTED: no-localization
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -28,10 +29,10 @@
#include <cassert>
#include <iostream>
-#include "test_macros.h"
-#include "test_iterators.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
+#include "make_string.h"
+#include "test_iterators.h"
+#include "test_macros.h"
MultiStringType InStr = MKSTR("abcdefg/\"hijklmnop\"/qrstuvwxyz/123456789");
MultiStringType OutStr = MKSTR("\"abcdefg/\\\"hijklmnop\\\"/qrstuvwxyz/123456789\"");
diff --git a/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp b/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp
index e524ecd..7b7c035 100644
--- a/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.nonmember/path.io.unicode_bug.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp b/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp
index 817742a..75c4dac 100644
--- a/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/path.nonmember/swap.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -18,7 +19,6 @@
#include "test_macros.h"
#include "count_new.h"
-#include "filesystem_test_helper.h"
// NOTE: this is tested in path.members/path.modifiers via the member swap.
int main(int, char**)
diff --git a/test/std/input.output/filesystems/class.path/path_helper.h b/test/std/input.output/filesystems/class.path/path_helper.h
new file mode 100644
index 0000000..2205def
--- /dev/null
+++ b/test/std/input.output/filesystems/class.path/path_helper.h
@@ -0,0 +1,101 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef TEST_STD_INPUT_OUTPUT_FILESYSTEMS_CLASS_PATH_PATH_HELPER_H
+#define TEST_STD_INPUT_OUTPUT_FILESYSTEMS_CLASS_PATH_PATH_HELPER_H
+
+#include <cstddef>
+#include <iterator>
+
+#include "filesystem_include.h"
+#include "make_string.h"
+
+// Testing the allocation behavior of the code_cvt functions requires
+// *knowing* that the allocation was not done by "path::__str_".
+// This hack forces path to allocate enough memory.
+inline void PathReserve(fs::path& p, std::size_t N) {
+ auto const& native_ref = p.native();
+ const_cast<fs::path::string_type&>(native_ref).reserve(N);
+}
+
+inline bool PathEq(fs::path const& LHS, fs::path const& RHS) {
+ return LHS.native() == RHS.native();
+}
+
+inline bool PathEqIgnoreSep(fs::path LHS, fs::path RHS) {
+ LHS.make_preferred();
+ RHS.make_preferred();
+ return LHS.native() == RHS.native();
+}
+
+template <class Iter>
+Iter IterEnd(Iter B) {
+ using VT = typename std::iterator_traits<Iter>::value_type;
+ for (; *B != VT{}; ++B)
+ ;
+ return B;
+}
+
+template <class CharT>
+const CharT* StrEnd(CharT const* P) {
+ return IterEnd(P);
+}
+
+template <class CharT>
+std::size_t StrLen(CharT const* P) {
+ return StrEnd(P) - P;
+}
+
+const MultiStringType PathList[] = {
+ MKSTR(""),
+ MKSTR(" "),
+ MKSTR("//"),
+ MKSTR("."),
+ MKSTR(".."),
+ MKSTR("foo"),
+ MKSTR("/"),
+ MKSTR("/foo"),
+ MKSTR("foo/"),
+ MKSTR("/foo/"),
+ MKSTR("foo/bar"),
+ MKSTR("/foo/bar"),
+ MKSTR("//net"),
+ MKSTR("//net/foo"),
+ MKSTR("///foo///"),
+ MKSTR("///foo///bar"),
+ MKSTR("/."),
+ MKSTR("./"),
+ MKSTR("/.."),
+ MKSTR("../"),
+ MKSTR("foo/."),
+ MKSTR("foo/.."),
+ MKSTR("foo/./"),
+ MKSTR("foo/./bar"),
+ MKSTR("foo/../"),
+ MKSTR("foo/../bar"),
+ MKSTR("c:"),
+ MKSTR("c:/"),
+ MKSTR("c:foo"),
+ MKSTR("c:/foo"),
+ MKSTR("c:foo/"),
+ MKSTR("c:/foo/"),
+ MKSTR("c:/foo/bar"),
+ MKSTR("prn:"),
+ MKSTR("c:\\"),
+ MKSTR("c:\\foo"),
+ MKSTR("c:foo\\"),
+ MKSTR("c:\\foo\\"),
+ MKSTR("c:\\foo/"),
+ MKSTR("c:/foo\\bar"),
+ MKSTR("//"),
+ MKSTR("/finally/we/need/one/really/really/really/really/really/really/really/long/string")
+};
+const unsigned PathListSize = sizeof(PathList) / sizeof(MultiStringType);
+
+#endif // TEST_STD_INPUT_OUTPUT_FILESYSTEMS_CLASS_PATH_PATH_HELPER_H
diff --git a/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp b/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp
index d07b4e0..8eef8c2 100644
--- a/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: availability-filesystem-missing
// path
@@ -16,7 +17,6 @@
#include <ranges>
-
static_assert(std::same_as<std::ranges::iterator_t<fs::path>, fs::path::iterator>);
static_assert(std::ranges::common_range<fs::path>);
static_assert(std::ranges::bidirectional_range<fs::path>);
diff --git a/test/std/input.output/filesystems/class.path/synop.pass.cpp b/test/std/input.output/filesystems/class.path/synop.pass.cpp
index ab18399..b68a560 100644
--- a/test/std/input.output/filesystems/class.path/synop.pass.cpp
+++ b/test/std/input.output/filesystems/class.path/synop.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp
index c633d3e..52d82f0 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// recursive_directory_iterator
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp
index 3e007dd..b52e1a6 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp
index 95a7762..d3fcc40 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/copy_assign.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp
index ced81b9..8135e00 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/ctor.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp
index 32bd074..dfa426e 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/depth.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp
index 061046e..bb6ff41 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/disable_recursion_pending.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp
index 1616bcf..0652501 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
index 9a157ad..da98291 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp
index be32042..a3cb141 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp
index 65c3042..0770f79 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/move_assign.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp
index 0a80fe1..d3400a0 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/pop.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp
index 721ed7b..815ff8a 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp
index f0b6804..37f8c33 100644
--- a/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp
+++ b/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp b/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
index 210d28a..dacb9d1 100644
--- a/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
+++ b/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_borrowed_range.compile.pass.cpp b/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_borrowed_range.compile.pass.cpp
index 2cbf924..c73eebf 100644
--- a/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_borrowed_range.compile.pass.cpp
+++ b/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_borrowed_range.compile.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_view.compile.pass.cpp b/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_view.compile.pass.cpp
index f5c1471..df3f098 100644
--- a/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_view.compile.pass.cpp
+++ b/test/std/input.output/filesystems/fs.filesystem.synopsis/enable_view.compile.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp b/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp
index afdf0ec..f416dc1 100644
--- a/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp
+++ b/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp b/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp
index 578adda..fedd898 100644
--- a/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp
+++ b/test/std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, windows
+// UNSUPPORTED: availability-filesystem-missing
// MS STL and libstdc++ use the native windows file timestamp resolution,
// with 100 ns resolution.
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
index 2a05056..a9c6d21 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -18,6 +20,7 @@
#include "test_macros.h"
#include "filesystem_test_helper.h"
+#include "../../class.path/path_helper.h"
using namespace fs;
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
index fb88b4a..c842e1b 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -20,6 +22,7 @@
#include "assert_macros.h"
#include "test_macros.h"
#include "filesystem_test_helper.h"
+#include "../../class.path/path_helper.h"
using namespace fs;
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
index 2d7acf3..afcd5ab 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
index 06d2c0b..a5071b1 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
index 31d43eb..51c2481 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
@@ -8,6 +8,8 @@
// UNSUPPORTED: c++03
// REQUIRES: long_tests
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
index c618acf..5b2bcb2 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_symlink/copy_symlink.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
index ecc68e8..0f95242 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// This test requires the dylib support introduced in D92769.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
index daa160b..8dc6e1d 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// This test requires the dylib support introduced in http://llvm.org/D92769.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
index 8fbfdcf..29c2a43 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// This test requires the dylib support introduced in http://llvm.org/D92769.
// XFAIL: stdlib=apple-libc++ && target={{.+}}-apple-macosx{{10.15|11.0}}
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
index cd8d053..c3c8c2d 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_directory_symlink/create_directory_symlink.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp
index 5145cd4..1714059 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_hard_link/create_hard_link.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
index 28d7f4a..0ce1cc1 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.create_symlink/create_symlink.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp
index 981c549..0962ce0 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp
index e9c8935..7fd1bf3 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp
index c16a592..8a2776e 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
index 8e532fd..413e48f 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp
index b646b46..65a42e9 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp
index 3986b18..d461207 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_block_file/is_block_file.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp
index 610d97b..0446a93 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_char_file/is_character_file.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp
index 7cb297b..2a57865 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_directory/is_directory.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp
index 752e682..74040ba 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp
index b0ef430..d960454 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_fifo/is_fifo.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp
index 8b37190..d05baed 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_other/is_other.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp
index b32ce64..96fc6d4 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_regular_file/is_regular_file.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp
index da5169f..305ebd6 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_socket/is_socket.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp
index e8ee7f4..a5ccb28 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_symlink/is_symlink.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
index 7b6bf45..555b22f 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// The string reported on errors changed, which makes those tests fail when run
// against already-released libc++'s.
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
index dc5ff11..ff1493f 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
index 2970d9f..8be1771 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -21,7 +23,7 @@
#include "test_macros.h"
#include "count_new.h"
#include "filesystem_test_helper.h"
-
+#include "../../class.path/path_helper.h"
static int count_path_elems(const fs::path& p) {
int count = 0;
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
index fa0bf95..f1579ad 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.read_symlink/read_symlink.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
index 820162f..5af707b 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp
index f82a583..7abe973 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove/remove.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
index a6842b2..6e9678b 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp
@@ -9,6 +9,8 @@
// XFAIL: LIBCXX-FREEBSD-FIXME
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp
index e327e72..0dfe177 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.remove_all/toctou.pass.cpp
@@ -9,6 +9,8 @@
// UNSUPPORTED: c++03
// UNSUPPORTED: no-localization
// UNSUPPORTED: no-threads
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp
index b1ac260..8dbf19e 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp
index 0b03bb8..c5f5438 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.resize_file/resize_file.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp
index 7659cde..227837f 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp
index 17abaf7..6d31191 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.status_known/status_known.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.status_known/status_known.pass.cpp
index 1394c08..f6331da 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.status_known/status_known.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.status_known/status_known.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp
index 3ab50c3..a58d357 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
index 49a7f36..1e46a9f 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp b/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp
index b0909da..d63da5c 100644
--- a/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp
+++ b/test/std/input.output/filesystems/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
+// UNSUPPORTED: no-filesystem
+// UNSUPPORTED: availability-filesystem-missing
// <filesystem>
@@ -21,7 +23,7 @@
#include "test_iterators.h"
#include "count_new.h"
#include "filesystem_test_helper.h"
-
+#include "../../class.path/path_helper.h"
int main(int, char**) {
diff --git a/test/std/input.output/filesystems/fs.req.namespace/namespace.compile.pass.cpp b/test/std/input.output/filesystems/fs.req.namespace/namespace.compile.pass.cpp
index a8479a3..3279d90 100644
--- a/test/std/input.output/filesystems/fs.req.namespace/namespace.compile.pass.cpp
+++ b/test/std/input.output/filesystems/fs.req.namespace/namespace.compile.pass.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
+// UNSUPPORTED: no-filesystem
// <filesystem>
diff --git a/test/std/input.output/filesystems/fs.req.namespace/namespace.verify.cpp b/test/std/input.output/filesystems/fs.req.namespace/namespace.verify.cpp
index fd07cca..dafb5c1 100644
--- a/test/std/input.output/filesystems/fs.req.namespace/namespace.verify.cpp
+++ b/test/std/input.output/filesystems/fs.req.namespace/namespace.verify.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// REQUIRES: c++03 || c++11 || c++14
+// UNSUPPORTED: no-filesystem
// <filesystem>
diff --git a/test/std/time/time.clock/time.clock.file/now.pass.cpp b/test/std/time/time.clock/time.clock.file/now.pass.cpp
index cf4e39b..0852483 100644
--- a/test/std/time/time.clock/time.clock.file/now.pass.cpp
+++ b/test/std/time/time.clock/time.clock.file/now.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/time/time.clock/time.clock.file/to_from_sys.pass.cpp b/test/std/time/time.clock/time.clock.file/to_from_sys.pass.cpp
index 261b08b..5b1f465 100644
--- a/test/std/time/time.clock/time.clock.file/to_from_sys.pass.cpp
+++ b/test/std/time/time.clock/time.clock.file/to_from_sys.pass.cpp
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: no-filesystem
// UNSUPPORTED: availability-filesystem-missing
diff --git a/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp b/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
index aafff36..c17caa7 100644
--- a/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
+++ b/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
@@ -22,16 +22,17 @@
#include <complex>
#include <concepts>
#include <deque>
+#include <filesystem>
#include <format>
#include <forward_list>
#include <list>
-#include <memory>
#include <map>
+#include <memory>
#include <optional>
#include <queue>
#include <set>
-#include <stack>
#include <span>
+#include <stack>
#include <tuple>
#include <type_traits>
#include <unordered_map>
@@ -42,9 +43,6 @@
#include "test_macros.h"
#include "min_allocator.h"
-#ifndef TEST_HAS_NO_FILESYSTEM
-# include <filesystem>
-#endif
#ifndef TEST_HAS_NO_LOCALIZATION
# include <regex>
#endif
@@ -196,9 +194,7 @@
assert_is_not_formattable<std::bitset<42>, CharT>();
assert_is_not_formattable<std::complex<double>, CharT>();
assert_is_not_formattable<std::error_code, CharT>();
-#ifndef TEST_HAS_NO_FILESYSTEM
assert_is_not_formattable<std::filesystem::path, CharT>();
-#endif
assert_is_not_formattable<std::shared_ptr<int>, CharT>();
#ifndef TEST_HAS_NO_LOCALIZATION
if constexpr (!std::same_as<CharT, int>) // sub_match only works with proper character types
diff --git a/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp b/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp
index acb1046..8756cb9 100644
--- a/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp
+++ b/test/std/utilities/format/format.range/format.range.fmtkind/format_kind.compile.pass.cpp
@@ -20,6 +20,7 @@
#include <array>
#include <deque>
+#include <filesystem>
#include <format>
#include <forward_list>
#include <iterator>
@@ -28,17 +29,13 @@
#include <ranges>
#include <set>
#include <span>
-#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <valarray>
+#include <vector>
#include "test_macros.h"
-#ifndef TEST_HAS_NO_FILESYSTEM
-# include <filesystem>
-#endif
-
// [format.range.fmtkind]
// If same_as<remove_cvref_t<ranges::range_reference_t<R>>, R> is true,
// format_kind<R> is range_format::disabled.
@@ -67,9 +64,7 @@
static_assert(std::ranges::input_range<recursive_range>, "format_kind requires an input range");
static_assert(std::format_kind<recursive_range> == std::range_format::disabled);
-#ifndef TEST_HAS_NO_FILESYSTEM
static_assert(std::format_kind<std::filesystem::path> == std::range_format::disabled);
-#endif
static_assert(std::format_kind<std::map<int, int>> == std::range_format::map);
static_assert(std::format_kind<std::multimap<int, int>> == std::range_format::map);
diff --git a/test/support/filesystem_test_helper.h b/test/support/filesystem_test_helper.h
index c7a5470..d63b1e6 100644
--- a/test/support/filesystem_test_helper.h
+++ b/test/support/filesystem_test_helper.h
@@ -466,111 +466,6 @@
CWDGuard& operator=(CWDGuard const&) = delete;
};
-// Misc test types
-
-const MultiStringType PathList[] = {
- MKSTR(""),
- MKSTR(" "),
- MKSTR("//"),
- MKSTR("."),
- MKSTR(".."),
- MKSTR("foo"),
- MKSTR("/"),
- MKSTR("/foo"),
- MKSTR("foo/"),
- MKSTR("/foo/"),
- MKSTR("foo/bar"),
- MKSTR("/foo/bar"),
- MKSTR("//net"),
- MKSTR("//net/foo"),
- MKSTR("///foo///"),
- MKSTR("///foo///bar"),
- MKSTR("/."),
- MKSTR("./"),
- MKSTR("/.."),
- MKSTR("../"),
- MKSTR("foo/."),
- MKSTR("foo/.."),
- MKSTR("foo/./"),
- MKSTR("foo/./bar"),
- MKSTR("foo/../"),
- MKSTR("foo/../bar"),
- MKSTR("c:"),
- MKSTR("c:/"),
- MKSTR("c:foo"),
- MKSTR("c:/foo"),
- MKSTR("c:foo/"),
- MKSTR("c:/foo/"),
- MKSTR("c:/foo/bar"),
- MKSTR("prn:"),
- MKSTR("c:\\"),
- MKSTR("c:\\foo"),
- MKSTR("c:foo\\"),
- MKSTR("c:\\foo\\"),
- MKSTR("c:\\foo/"),
- MKSTR("c:/foo\\bar"),
- MKSTR("//"),
- MKSTR("/finally/we/need/one/really/really/really/really/really/really/really/long/string")
-};
-const unsigned PathListSize = sizeof(PathList) / sizeof(MultiStringType);
-
-template <class Iter>
-Iter IterEnd(Iter B) {
- using VT = typename std::iterator_traits<Iter>::value_type;
- for (; *B != VT{}; ++B)
- ;
- return B;
-}
-
-template <class CharT>
-const CharT* StrEnd(CharT const* P) {
- return IterEnd(P);
-}
-
-template <class CharT>
-std::size_t StrLen(CharT const* P) {
- return StrEnd(P) - P;
-}
-
-// Testing the allocation behavior of the code_cvt functions requires
-// *knowing* that the allocation was not done by "path::__str_".
-// This hack forces path to allocate enough memory.
-inline void PathReserve(fs::path& p, std::size_t N) {
- auto const& native_ref = p.native();
- const_cast<fs::path::string_type&>(native_ref).reserve(N);
-}
-
-template <class Iter1, class Iter2>
-bool checkCollectionsEqual(
- Iter1 start1, Iter1 const end1
- , Iter2 start2, Iter2 const end2
- )
-{
- while (start1 != end1 && start2 != end2) {
- if (*start1 != *start2) {
- return false;
- }
- ++start1; ++start2;
- }
- return (start1 == end1 && start2 == end2);
-}
-
-
-template <class Iter1, class Iter2>
-bool checkCollectionsEqualBackwards(
- Iter1 const start1, Iter1 end1
- , Iter2 const start2, Iter2 end2
- )
-{
- while (start1 != end1 && start2 != end2) {
- --end1; --end2;
- if (*end1 != *end2) {
- return false;
- }
- }
- return (start1 == end1 && start2 == end2);
-}
-
// We often need to test that the error_code was cleared if no error occurs
// this function returns an error_code which is set to an error that will
// never be returned by the filesystem functions.
@@ -624,16 +519,6 @@
;
}
-inline bool PathEq(fs::path const& LHS, fs::path const& RHS) {
- return LHS.native() == RHS.native();
-}
-
-inline bool PathEqIgnoreSep(fs::path LHS, fs::path RHS) {
- LHS.make_preferred();
- RHS.make_preferred();
- return LHS.native() == RHS.native();
-}
-
inline fs::perms NormalizeExpectedPerms(fs::perms P) {
#ifdef _WIN32
// On Windows, fs::perms only maps down to one bit stored in the filesystem,
diff --git a/utils/data/ignore_format.txt b/utils/data/ignore_format.txt
index c995119..0d90319 100644
--- a/utils/data/ignore_format.txt
+++ b/utils/data/ignore_format.txt
@@ -180,7 +180,6 @@
libcxx/include/ext/hash_map
libcxx/include/ext/hash_set
libcxx/include/fenv.h
-libcxx/include/filesystem
libcxx/include/__filesystem/copy_options.h
libcxx/include/__filesystem/directory_entry.h
libcxx/include/__filesystem/directory_iterator.h