gcc/libstdc++-v3/testsuite
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
..
17_intro PR libstdc++/88607 add tests using -finput-charset=ascii 2019-01-06 00:49:11 +00:00
18_support Update copyright years. 2019-01-01 13:31:55 +01:00
19_diagnostics Update copyright years. 2019-01-01 13:31:55 +01:00
20_util P0357R3 reference_wrapper for incomplete types 2019-01-11 23:41:11 +00:00
21_strings Add allocator-extended copy/move ctors to COW string 2019-01-04 23:23:17 +00:00
22_locale PR libstdc++/88681 export missing symbols 2019-01-03 20:38:04 +00:00
23_containers Define __cpp_lib_erase_if feature test macro 2019-01-10 13:49:31 +00:00
24_iterators Update copyright years. 2019-01-01 13:31:55 +01:00
25_algorithms Update copyright years. 2019-01-01 13:31:55 +01:00
26_numerics PR libstdc++/88204 disable std::complex<long double> tests 2019-01-09 09:37:34 +00:00
27_io PR libstdc++/88881 adjust filesystem::status and tests for mingw semantics 2019-01-17 15:31:59 +00:00
28_regex Update copyright years. 2019-01-01 13:31:55 +01:00
29_atomics Update copyright years. 2019-01-01 13:31:55 +01:00
30_threads Update copyright years. 2019-01-01 13:31:55 +01:00
abi Update copyright years. 2019-01-01 13:31:55 +01:00
backward Update copyright years. 2019-01-01 13:31:55 +01:00
config Update copyright years. 2019-01-01 13:31:55 +01:00
data make_graph_test_infos.xml: Edit. 2011-08-15 00:51:06 +00:00
decimal Update copyright years. 2019-01-01 13:31:55 +01:00
experimental PR libstdc++/88881 adjust filesystem::status and tests for mingw semantics 2019-01-17 15:31:59 +00:00
ext Update copyright years. 2019-01-01 13:31:55 +01:00
lib Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-abi Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-dg Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-prettyprinters Fix failing prettyprinter test 2019-01-09 10:46:52 +00:00
libstdc++-xmethods Update copyright years. 2019-01-01 13:31:55 +01:00
performance Update copyright years. 2019-01-01 13:31:55 +01:00
special_functions Update copyright years. 2019-01-01 13:31:55 +01:00
tr1 Update copyright years. 2019-01-01 13:31:55 +01:00
tr2 Update copyright years. 2019-01-01 13:31:55 +01:00
util Include name of test in filesystem-test.XXXXXX filenames 2019-01-10 11:12:00 +00:00
Makefile.am Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.in Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00