aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/path/driver.cxx17
-rw-r--r--tests/process/driver.cxx6
2 files changed, 16 insertions, 7 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;
diff --git a/tests/process/driver.cxx b/tests/process/driver.cxx
index bc75cc2..ac8f54d 100644
--- a/tests/process/driver.cxx
+++ b/tests/process/driver.cxx
@@ -225,7 +225,7 @@ main (int argc, const char* argv[])
// write it to cout and/or cerr.
//
- if (!wd.empty () && wd.realize () != dir_path::current ())
+ if (!wd.empty () && wd.realize () != dir_path::current_directory ())
return 1;
try
@@ -305,7 +305,7 @@ main (int argc, const char* argv[])
// Execute the child using the relative path.
//
- dir_path::current (fp.directory ());
+ dir_path::current_directory (fp.directory ());
assert (exec (dir_path (".") / fp.leaf ()));
@@ -326,7 +326,7 @@ main (int argc, const char* argv[])
assert (_putenv (("PATH=" + paths).c_str ()) == 0);
#endif
- dir_path::current (fp.directory () / dir_path (".."));
+ dir_path::current_directory (fp.directory () / dir_path (".."));
assert (exec (fp.leaf ()));