diff options
Diffstat (limited to 'tests/fs/path/driver.cxx')
-rw-r--r-- | tests/fs/path/driver.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/fs/path/driver.cxx b/tests/fs/path/driver.cxx index f35d3eb..6c77e67 100644 --- a/tests/fs/path/driver.cxx +++ b/tests/fs/path/driver.cxx @@ -119,6 +119,19 @@ main () assert (path ("C:\\Foo12//Bar").normalize ().string () == "c:\\foo12\\bar"); #endif + // posix_string + // + assert (path ("foo/bar/../baz").posix_string () == "foo/bar/../baz"); +#ifdef _WIN32 + assert (path ("foo\\bar\\..\\baz").posix_string () == "foo/bar/../baz"); + try + { + path ("c:\\foo\\bar\\..\\baz").posix_string (); + assert (false); + } + catch (const invalid_path&) {} +#endif + /* path p ("../foo"); p.complete (); |