This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I missed one of the bullets describing the path normalizationalgorithm, and so failed to normalize "/.." to "/"
This also adjusts tests to compare paths more thoroughly, because using operator== doesn't catch some unwanted differences, e.g. filesystem::path("a///b") == "a/b" is true. * 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. Tested powerpc64le-linux, committed to trunk.
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |