gcc/libstdc++-v3/testsuite/27_io/filesystem/path
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
..
append PR libstdc++/78870 support std::filesystem on Windows 2018-05-31 20:20:24 +01:00
assign Update copyright years. 2018-01-03 11:03:58 +01:00
compare Update copyright years. 2018-01-03 11:03:58 +01:00
concat Refactor path construction from null terminated iterator ranges 2018-05-23 23:48:51 +01:00
construct PR libstdc++/78870 support std::filesystem on Windows 2018-05-31 20:20:24 +01:00
decompose PR libstdc++/78870 support std::filesystem on Windows 2018-05-31 20:20:24 +01:00
generation PR libstdc++/87116 fix path::lexically_normal() handling of dot-dot 2018-08-28 16:33:53 +01:00
generic Update copyright years. 2018-01-03 11:03:58 +01:00
io LWG 2989 hide path iostream operators from normal lookup 2018-06-18 19:59:44 +01:00
itr PR libstdc++/78870 support std::filesystem on Windows 2018-05-31 20:20:24 +01:00
modifiers Update copyright years. 2018-01-03 11:03:58 +01:00
native PR libstdc++/78870 support std::filesystem on Windows 2018-05-31 20:20:24 +01:00
nonmember PR libstdc++/84159 fix appending strings to paths 2018-05-15 13:07:09 +01:00
query PR libstdc++/78870 support std::filesystem on Windows 2018-05-31 20:20:24 +01:00