gcc/libstdc++-v3/testsuite/27_io
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
..
basic_filebuf Update copyright years. 2019-01-01 13:31:55 +01:00
basic_fstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_ifstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_ios Update copyright years. 2019-01-01 13:31:55 +01:00
basic_iostream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_istream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_istringstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_ofstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_ostream Implement LWG 2221: formatted output operator for nullptr 2019-01-10 13:14:57 +00:00
basic_ostringstream Update copyright years. 2019-01-01 13:31:55 +01:00
basic_streambuf Update copyright years. 2019-01-01 13:31:55 +01:00
basic_stringbuf Update copyright years. 2019-01-01 13:31:55 +01:00
basic_stringstream 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
fpos Update copyright years. 2019-01-01 13:31:55 +01:00
headers Update copyright years. 2019-01-01 13:31:55 +01:00
ios_base Update copyright years. 2019-01-01 13:31:55 +01:00
manipulators Update copyright years. 2019-01-01 13:31:55 +01:00
objects Update copyright years. 2019-01-01 13:31:55 +01:00
types Update copyright years. 2019-01-01 13:31:55 +01:00
rvalue_streams-2.cc Update copyright years. 2019-01-01 13:31:55 +01:00
rvalue_streams.cc Update copyright years. 2019-01-01 13:31:55 +01:00