mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-07-21 03:44:24 +08:00
Merge remote-tracking branch 'origin/master' into development-v1.1
This commit is contained in:
commit
9da57846ac
@ -149,7 +149,7 @@
|
|||||||
#define LWG_2937_BEHAVIOUR
|
#define LWG_2937_BEHAVIOUR
|
||||||
|
|
||||||
// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch)
|
// ghc::filesystem version in decimal (major * 10000 + minor * 100 + patch)
|
||||||
#define GHC_FILESYSTEM_VERSION 10100L
|
#define GHC_FILESYSTEM_VERSION 10101L
|
||||||
|
|
||||||
namespace ghc {
|
namespace ghc {
|
||||||
namespace filesystem {
|
namespace filesystem {
|
||||||
|
@ -781,7 +781,13 @@ TEST_CASE("30.10.8.4.11 path generation", "[filesystem][path][fs.path.gen]")
|
|||||||
CHECK(fs::path("/foo/../..").lexically_normal() == "/");
|
CHECK(fs::path("/foo/../..").lexically_normal() == "/");
|
||||||
CHECK(fs::path("foo/..").lexically_normal() == ".");
|
CHECK(fs::path("foo/..").lexically_normal() == ".");
|
||||||
CHECK(fs::path("ab/cd/ef/../../qw").lexically_normal() == "ab/qw");
|
CHECK(fs::path("ab/cd/ef/../../qw").lexically_normal() == "ab/qw");
|
||||||
|
CHECK(fs::path("a/b/../../../c").lexically_normal() == "../c");
|
||||||
|
#ifdef GHC_OS_WINDOWS
|
||||||
|
CHECK(fs::path("\\/\\///\\/").lexically_normal() == "/");
|
||||||
|
CHECK(fs::path("a/b/..\\//..///\\/../c\\\\/").lexically_normal() == "../c/");
|
||||||
|
CHECK(fs::path("..a/b/..\\//..///\\/../c\\\\/").lexically_normal() == "../c/");
|
||||||
|
#endif
|
||||||
|
|
||||||
// lexically_relative()
|
// lexically_relative()
|
||||||
CHECK(fs::path("/a/d").lexically_relative("/a/b/c") == "../../d");
|
CHECK(fs::path("/a/d").lexically_relative("/a/b/c") == "../../d");
|
||||||
CHECK(fs::path("/a/b/c").lexically_relative("/a/d") == "../b/c");
|
CHECK(fs::path("/a/b/c").lexically_relative("/a/d") == "../b/c");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user