summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-11-01 17:09:14 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2017-11-01 17:09:14 +0000
commit50e248f0c8dd85a0e1778050d998f4010d87ed46 (patch)
tree16c56de4fe2646dcaa19c9f79c802bcde54acda5 /libstdc++-v3/testsuite/27_io
parent37a2c475252b26895732fefbbb0050c864ba698d (diff)
downloadgcc-50e248f0c8dd85a0e1778050d998f4010d87ed46.tar.gz
PR libstdc++/82777 fix path normalization for dot-dot
PR libstdc++/82777 * src/filesystem/std-path.cc (path::lexically_normal): Remove dot-dot elements correctly. * testsuite/27_io/filesystem/path/generation/normal.cc: Add testcase. * testsuite/util/testsuite_fs.h (compare_paths): Improve exception text. From-SVN: r254317
Diffstat (limited to 'libstdc++-v3/testsuite/27_io')
-rw-r--r--libstdc++-v3/testsuite/27_io/filesystem/path/generation/normal.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/27_io/filesystem/path/generation/normal.cc b/libstdc++-v3/testsuite/27_io/filesystem/path/generation/normal.cc
index 789ce186f82..df3b7154ab3 100644
--- a/libstdc++-v3/testsuite/27_io/filesystem/path/generation/normal.cc
+++ b/libstdc++-v3/testsuite/27_io/filesystem/path/generation/normal.cc
@@ -46,6 +46,10 @@ test02()
compare_paths( path().lexically_normal(), "" );
compare_paths( path("/..").lexically_normal(), "/" );
+
+ // PR libstdc++/82777
+ compare_paths( path("./a/b/c/../.././b/c").lexically_normal(), "a/b/c" );
+ compare_paths( path("/a/b/c/../.././b/c").lexically_normal(), "/a/b/c" );
}
void