aboutsummaryrefslogtreecommitdiff
path: root/tests/path
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-12-07 01:22:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-12-07 11:27:32 +0300
commit3e6110dec6f4cb004b8594b9b798a9db5b08fe7a (patch)
treee27cd6b75386752c7bf5cbe0bb35b55e17ff6c0e /tests/path
parente7b033d7b38bc55f934521b5f35060b43a8b0526 (diff)
Add path::current(), path::parent()
Diffstat (limited to 'tests/path')
-rw-r--r--tests/path/driver.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/path/driver.cxx b/tests/path/driver.cxx
index fe192ce..4806cea 100644
--- a/tests/path/driver.cxx
+++ b/tests/path/driver.cxx
@@ -141,6 +141,15 @@ main ()
assert (path ("C:\\foo.txt\\").base ().representation () == "C:\\foo\\");
#endif
+ // current/parent
+ //
+ assert (path (".").current ());
+ assert (path ("./").current ());
+ assert (!path (".abc").current ());
+ assert (path ("..").parent ());
+ assert (path ("../").parent ());
+ assert (!path ("..abc").parent ());
+
// iteration
//
{
@@ -483,8 +492,8 @@ main ()
assert (path::temp_directory ().absolute ());
//assert (wpath::temp_directory ().absolute ());
- assert (path::home ().absolute ());
- //assert (wpath::home ().absolute ());
+ assert (path::home_directory ().absolute ());
+ //assert (wpath::home_directory ().absolute ());
// normalize and actualize
//
@@ -503,7 +512,7 @@ main ()
assert (test ("c:\\pROGRAM fILES/NonSense\\sTUFF/") ==
"C:\\Program Files\\NonSense\\sTUFF\\");
- dir_path cwd (path::current ());
+ dir_path cwd (path::current_directory ());
assert (cwd.normalize (true).representation () == cwd.representation ());
}
#endif
@@ -512,7 +521,7 @@ main ()
path p ("../foo");
p.complete ();
- cerr << path::current () << endl;
+ cerr << path::current_directory () << endl;
cerr << p << endl;
p.normalize ();
cerr << p << endl;