From 3eff6aeefaa8b44040c1bab5daaa1fedb43f27dd Mon Sep 17 00:00:00 2001 From: "Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)" Date: Thu, 19 Nov 2020 12:48:43 +0000 Subject: Add path_view::without_trailing_separator(). --- test/tests/path_view.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/tests/path_view.cpp b/test/tests/path_view.cpp index 98224c2b..74f0e098 100644 --- a/test/tests/path_view.cpp +++ b/test/tests/path_view.cpp @@ -117,6 +117,9 @@ static inline void TestPathView() e = e.remove_filename(); BOOST_CHECK(0 == e.compare<>("/mnt/c/Users/ned/Documents/boostish/afio/programs/build_posix/testdir/")); BOOST_CHECK(0 == f.compare<>("0")); + // Trailing + BOOST_CHECK(0 == llfio::path_view("/a/b/").without_trailing_separator().compare<>("/a/b")); + BOOST_CHECK(0 == llfio::path_view("/a/b").without_trailing_separator().compare<>("/a/b")); #ifndef _WIN32 // cstr llfio::path_view::c_str<> g(e, llfio::path_view::zero_terminated); -- cgit v1.2.3