]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/testsuite/27_io/filesystem/path/modifiers/replace_filename.cc
Fix filesystem::path::lexically_normal algorithm
authorJonathan Wakely <jwakely@redhat.com>
Wed, 25 Oct 2017 12:42:53 +0000 (13:42 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 25 Oct 2017 12:42:53 +0000 (13:42 +0100)
commiteeb517d3e7fd3717f4fa7cc8a1e6d4499013fee3
tree9e06daf731c47d427c3aa8fd30441f6be11bd4a4
parent5de583cc1809a49a4b38950d2fc4633e31085a33
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.

From-SVN: r254075
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
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