aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/path/driver.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/path/driver.cxx b/tests/path/driver.cxx
index 28da0a0..b855e34 100644
--- a/tests/path/driver.cxx
+++ b/tests/path/driver.cxx
@@ -208,6 +208,15 @@ main ()
assert (++i != p.end () && *i == "bar" && i.separator () == '\0');
assert (++i == p.end ());
}
+ /*
+ {
+ path p ("foo//bar");
+ path::iterator i (p.begin ());
+ assert (i != p.end () && *i == "foo" && i.separator () == '/');
+ assert (++i != p.end () && *i == "bar" && i.separator () == '\0');
+ assert (++i == p.end ());
+ }
+ */
{
path p ("foo/bar/");
path::iterator i (p.begin ());
@@ -251,6 +260,15 @@ main ()
assert (i != p.rend () && *i == "");
assert (++i == p.rend ());
}
+#else
+ {
+ path p ("C:\\foo\\bar");
+ path::iterator i (p.begin ());
+ assert (i != p.end () && *i == "C:");
+ assert (++i != p.end () && *i == "foo");
+ assert (++i != p.end () && *i == "bar");
+ assert (++i == p.end ());
+ }
#endif
// iterator range construction
@@ -318,6 +336,7 @@ main ()
assert ((path ("foo/") / path ()).representation () == "foo/");
#else
assert ((path ("C:\\") / path ("tmp")).representation () == "C:\\tmp");
+ assert ((path ("C:") / path ("tmp")).representation () == "C:\\tmp");
assert ((path ("foo\\") / path ("bar")).representation () == "foo\\bar");
assert ((path ("foo\\") / path ("bar\\")).representation () == "foo\\bar\\");
assert ((path ("foo\\") / path ("bar/")).representation () == "foo\\bar/");