[libcxx-commits] [PATCH] D98108: [libcxx] [test] Fix path.modifiers remove_filename and replace_filename for windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 7 00:48:02 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGab67fd39fc14: [libcxx] [test] Fix path.modifiers remove_filename and replace_filename for… (authored by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D98108?vs=328745&id=328847#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98108/new/
https://reviews.llvm.org/D98108
Files:
libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp
libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/replace_filename.pass.cpp
@@ -12,7 +12,7 @@
// class path
-// path& replace_filename()
+// path& replace_filename( const path& replacement );
#include "filesystem_include.h"
#include <type_traits>
@@ -35,10 +35,19 @@
, {"/foo", "/", ""}
, {"foo", "bar", "bar"}
, {"/", "/bar", "bar"}
+#ifdef _WIN32
+ , {"\\", "\\bar", "bar"}
+#else
, {"\\", "bar", "bar"}
+#endif
, {"///", "///bar", "bar"}
+#ifdef _WIN32
+ , {"\\\\", "\\\\bar", "bar"}
+ , {"\\/\\", "\\/\\bar", "bar"}
+#else
, {"\\\\", "bar", "bar"}
, {"\\/\\", "\\/bar", "bar"}
+#endif
, {".", "bar", "bar"}
, {"..", "bar", "bar"}
, {"/foo\\baz/bong/", "/foo\\baz/bong/bar", "bar"}
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.modifiers/remove_filename.pass.cpp
@@ -34,13 +34,21 @@
, {"/", "/"}
, {"//", "//"}
, {"///", "///"}
+#ifdef _WIN32
+ , {"\\", "\\"}
+#else
, {"\\", ""}
+#endif
, {".", ""}
, {"..", ""}
, {"/foo", "/"}
, {"foo/bar", "foo/"}
, {"foo/", "foo/"}
+#ifdef _WIN32
+ , {"//foo", "//foo"}
+#else
, {"//foo", "//"}
+#endif
, {"//foo/", "//foo/"}
, {"//foo///", "//foo///"}
, {"///foo", "///"}
@@ -49,7 +57,11 @@
, {"/foo/.", "/foo/"}
, {"/foo/..", "/foo/"}
, {"/foo/////", "/foo/////"}
+#ifdef _WIN32
+ , {"/foo\\\\", "/foo\\\\"}
+#else
, {"/foo\\\\", "/"}
+#endif
, {"/foo//\\/", "/foo//\\/"}
, {"///foo", "///"}
, {"file.txt", ""}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98108.328847.patch
Type: text/x-patch
Size: 2167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210307/7c7eda88/attachment.bin>
More information about the libcxx-commits
mailing list