gcc/libstdc++-v3/testsuite/27_io/filesystem
Jonathan Wakely dd35da2cbe PR libstdc++/87116 fix path::lexically_normal() handling of dot-dot
Previously the logic that turned "a/b/c/../.." into "a/" failed to
preserve an empty path at the end of the iteration sequence, as required
by the trailing slash. That meant the result didn't meet the class
invariants, and that "a/b/c/d/../../.." would remove four components
instead of the three that "../../.." should remove.

	PR libstdc++/87116
	* src/filesystem/std-path.cc (path::lexically_normal): When handling
	a dot-dot filename, preserve an empty final component in the iteration
	sequence.
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use preferred-separator for
	root-directory.
	* testsuite/27_io/filesystem/path/generation/normal.cc: Add new tests
	for more than two adjacent dot-dot filenames.
	[_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Replace slashes with
	preferred-separator in expected normalized strings.

From-SVN: r263922
2018-08-28 16:33:53 +01:00
..
directory_entry PR libstdc++/86597 directory_entry observers should clear error_code 2018-08-08 14:09:19 +01:00
file_status Update copyright years. 2018-01-03 11:03:58 +01:00
iterators PR libstdc++/78870 support std::filesystem on Windows 2018-05-31 20:20:24 +01:00
operations Mark some Filesystem tests as XFAIL for mingw 2018-06-05 08:37:30 +01:00
path PR libstdc++/87116 fix path::lexically_normal() handling of dot-dot 2018-08-28 16:33:53 +01:00