Fix filesystem::path::lexically_normal algorithm
commit5a6a0bf5071c7fb52650fc8892c37270a618486f
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Oct 2017 12:42:53 +0000 (25 12:42 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Oct 2017 12:42:53 +0000 (25 12:42 +0000)
tree9e06daf731c47d427c3aa8fd30441f6be11bd4a4
parent2201c33012d4c6dc522ddbfa97f5aa95a209e24d
Fix filesystem::path::lexically_normal algorithm

* src/filesystem/std-path.cc (path::lexically_normal): Add missing
step to algorithm, for removing dot-dot elements after root-directory.
* testsuite/27_io/filesystem/operations/canonical.cc: Use
compare_paths for more exhaustive checks.
* testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
* testsuite/27_io/filesystem/path/append/path.cc: Likewise.
* testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
* testsuite/27_io/filesystem/path/concat/strings.cc: Fix comment.
* testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
* testsuite/27_io/filesystem/path/decompose/root_directory.cc:
Likewise.
* testsuite/27_io/filesystem/path/generation/normal.cc: Use
compare_paths for more exhaustive checks. Add extra testcases.
* testsuite/27_io/filesystem/path/generation/proximate.cc: Use
compare_paths for more exhaustive checks.
* testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
* testsuite/27_io/filesystem/path/generic/generic_string.cc: Remove
unused header.
* testsuite/27_io/filesystem/path/modifiers/make_preferred.cc: Fix
comment.
* testsuite/27_io/filesystem/path/modifiers/remove_filename.cc: Use
compare_paths for more exhaustive checks.
* testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
Likewise.
* testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
Likewise.
* testsuite/util/testsuite_fs.h (compare_paths): Also compare native
strings.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254075 138bc75d-0d04-0410-961f-82ee72b054a4
18 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/src/filesystem/std-path.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/canonical.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/proximate.cc
libstdc++-v3/testsuite/27_io/filesystem/path/append/path.cc
libstdc++-v3/testsuite/27_io/filesystem/path/concat/path.cc
libstdc++-v3/testsuite/27_io/filesystem/path/concat/strings.cc
libstdc++-v3/testsuite/27_io/filesystem/path/construct/locale.cc
libstdc++-v3/testsuite/27_io/filesystem/path/decompose/root_directory.cc
libstdc++-v3/testsuite/27_io/filesystem/path/generation/normal.cc
libstdc++-v3/testsuite/27_io/filesystem/path/generation/proximate.cc [copied from libstdc++-v3/testsuite/27_io/filesystem/path/generation/relative.cc with 61% similarity]
libstdc++-v3/testsuite/27_io/filesystem/path/generation/relative.cc
libstdc++-v3/testsuite/27_io/filesystem/path/generic/generic_string.cc
libstdc++-v3/testsuite/27_io/filesystem/path/modifiers/make_preferred.cc
libstdc++-v3/testsuite/27_io/filesystem/path/modifiers/remove_filename.cc
libstdc++-v3/testsuite/27_io/filesystem/path/modifiers/replace_extension.cc
libstdc++-v3/testsuite/27_io/filesystem/path/modifiers/replace_filename.cc
libstdc++-v3/testsuite/util/testsuite_fs.h