diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-05-30 19:57:03 -0400 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-05-30 19:57:03 -0400 |
commit | 7777dce64be826d070b17312d7e82b6ce8eb21de (patch) | |
tree | 97f30f269497a303328414856db8be5455d136b5 /tests/fs | |
parent | 3a1b35c227d8b51d1bb488db511f82c666a38ea0 (diff) |
Add posix_string() function to fs::basic_path class template
Diffstat (limited to 'tests/fs')
-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 (); |