Test: Added Directory::cd test

This commit is contained in:
Paul Beckingham 2015-10-28 11:17:26 -04:00
parent 67c28b7015
commit ec027b707d

View file

@ -35,7 +35,7 @@ Context context;
int main (int, char**) int main (int, char**)
{ {
UnitTest t (111); UnitTest t (112);
// Ensure environment has no influence. // Ensure environment has no influence.
unsetenv ("TASKDATA"); unsetenv ("TASKDATA");
@ -284,6 +284,10 @@ int main (int, char**)
d10.remove (); d10.remove ();
t.notok (d10.exists (), "Directory::remove temp/dir.perm file no longer exists"); t.notok (d10.exists (), "Directory::remove temp/dir.perm file no longer exists");
// Directory::cd
Directory d11 ("/tmp");
t.ok (d11.cd (), "Directory::cd /tmp good");
tmp.remove (); tmp.remove ();
t.notok (tmp.exists (), "tmp dir removed."); t.notok (tmp.exists (), "tmp dir removed.");