Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-11-19 14:46:06 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-11-19 14:46:06 +0300
commit231ba8be57b4a7450566a15aacc1acb5871c71eb (patch)
tree16fae0090881c284c7b16a47a101af19f8dafd65 /test
parentaab44c3e391319f480d03681fd4e58d61fb76241 (diff)
Also fix path_view::remove_filename(), which was not returning a trailing slash.
Diffstat (limited to 'test')
-rw-r--r--test/tests/path_view.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/tests/path_view.cpp b/test/tests/path_view.cpp
index 01e61bf2..98224c2b 100644
--- a/test/tests/path_view.cpp
+++ b/test/tests/path_view.cpp
@@ -56,6 +56,7 @@ static inline void CheckPathView(const LLFIO_V2_NAMESPACE::filesystem::path &pat
CheckPathView(path, "filename()", [](const auto &p) { return p.filename(); });
CheckPathView(path, "stem()", [](const auto &p) { return p.stem(); });
CheckPathView(path, "extension()", [](const auto &p) { return p.extension(); });
+ CheckPathView(path, "remove_filename()", [](auto p) { return p.remove_filename(); });
}
static inline void CheckPathIteration(const LLFIO_V2_NAMESPACE::filesystem::path &path)
@@ -114,7 +115,7 @@ static inline void TestPathView()
llfio::path_view e(p); // NOLINT
llfio::path_view f(e.filename());
e = e.remove_filename();
- BOOST_CHECK(0 == e.compare<>("/mnt/c/Users/ned/Documents/boostish/afio/programs/build_posix/testdir"));
+ BOOST_CHECK(0 == e.compare<>("/mnt/c/Users/ned/Documents/boostish/afio/programs/build_posix/testdir/"));
BOOST_CHECK(0 == f.compare<>("0"));
#ifndef _WIN32
// cstr
@@ -160,7 +161,7 @@ static inline void TestPathView()
llfio::path_view g(p2);
llfio::path_view h(g.filename());
g = g.remove_filename();
- BOOST_CHECK(0 == g.compare<>("\\mnt\\c\\Users\\ned\\Documents\\boostish\\afio\\programs\\build_posix\\testdir"));
+ BOOST_CHECK(0 == g.compare<>("\\mnt\\c\\Users\\ned\\Documents\\boostish\\afio\\programs\\build_posix\\testdir\\"));
BOOST_CHECK(0 == h.compare<>("0"));
// cstr
llfio::path_view::c_str<> i(g, llfio::path_view::zero_terminated);