gcc/libstdc++-v3/testsuite/experimental
Jonathan Wakely dd0f7ba273 PR libstdc++/88881 adjust filesystem::status and tests for mingw semantics
On Windows stat("foo/bar/../.") will resolve to "foo" even if that is a
non-directory and "foo/bar" does not exist. This is the expected
behaviour and consistent with boost::filesystem, so don't try to correct
it. The only unwanted behaviour is that stat("baz/") fails due to a
mingw bug (fixed in mingw-w64 v6.0.0) so add a workaround.

	PR libstdc++/88881
	* src/c++17/fs_ops.cc (canonical(const path&, error_code&))
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
	of filesystem::exists.
	(create_directories(const path&, error_code&)): Add assertions.
	(status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
	Add workaround for bug in _wstat for paths with trailing slash.
	* testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
	for expected behaviour on mingw.
	* testsuite/experimental/filesystem/operations/create_directories.cc:
	Likewise.
	* testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
	"TMP" instead of "TMPDIR" and clean environment before each test. Do
	not test permissions on mingw targets.

From-SVN: r268034
2019-01-17 15:31:59 +00:00
..
algorithm Update copyright years. 2019-01-01 13:31:55 +01:00
any Update copyright years. 2019-01-01 13:31:55 +01:00
array Update copyright years. 2019-01-01 13:31:55 +01:00
chrono Update copyright years. 2019-01-01 13:31:55 +01:00
deque Update copyright years. 2019-01-01 13:31:55 +01:00
filesystem PR libstdc++/88881 adjust filesystem::status and tests for mingw semantics 2019-01-17 15:31:59 +00:00
forward_list Update copyright years. 2019-01-01 13:31:55 +01:00
functional Update copyright years. 2019-01-01 13:31:55 +01:00
iterator Update copyright years. 2019-01-01 13:31:55 +01:00
list Update copyright years. 2019-01-01 13:31:55 +01:00
map Update copyright years. 2019-01-01 13:31:55 +01:00
memory Update copyright years. 2019-01-01 13:31:55 +01:00
memory_resource Update copyright years. 2019-01-01 13:31:55 +01:00
net Check AI_NUMERICSERV is defined before using it 2019-01-10 13:21:54 +00:00
numeric Update copyright years. 2019-01-01 13:31:55 +01:00
optional Update copyright years. 2019-01-01 13:31:55 +01:00
polymorphic_allocator Update copyright years. 2019-01-01 13:31:55 +01:00
propagate_const Update copyright years. 2019-01-01 13:31:55 +01:00
random Update copyright years. 2019-01-01 13:31:55 +01:00
ratio Update copyright years. 2019-01-01 13:31:55 +01:00
set Update copyright years. 2019-01-01 13:31:55 +01:00
source_location Update copyright years. 2019-01-01 13:31:55 +01:00
string Update copyright years. 2019-01-01 13:31:55 +01:00
string_view Fix year range in copyright header 2019-01-02 10:44:35 +00:00
system_error Update copyright years. 2019-01-01 13:31:55 +01:00
tuple Update copyright years. 2019-01-01 13:31:55 +01:00
type_erased_allocator Update copyright years. 2019-01-01 13:31:55 +01:00
type_traits Update copyright years. 2019-01-01 13:31:55 +01:00
unordered_map Update copyright years. 2019-01-01 13:31:55 +01:00
unordered_set Update copyright years. 2019-01-01 13:31:55 +01:00
vector Update copyright years. 2019-01-01 13:31:55 +01:00
feat-cxx14.cc Use dg-do preprocess instead of compile for tests 2016-08-23 11:13:31 +01:00
feat-lib-fund.cc Use dg-do preprocess instead of compile for tests 2016-08-23 11:13:31 +01:00