Test: Added Path::is_link test

This commit is contained in:
Paul Beckingham 2015-07-17 20:14:35 -04:00
parent b522eecf8d
commit 9ae6c5ae7a

View file

@ -35,7 +35,7 @@ Context context;
int main (int argc, char** argv)
{
UnitTest t (108);
UnitTest t (110);
// Ensure environment has no influence.
unsetenv ("TASKDATA");
@ -56,6 +56,9 @@ int main (int argc, char** argv)
Path p3 ("/tmp");
t.ok (p3._data == "/tmp", "/tmp -> /tmp");
// operator==
t.notok (p2 == p3, "p2 != p3");
// Path& operator= (const Path&);
Path p3_copy (p3);
t.is (p3._data, p3_copy._data, "Path::Path (Path&)");
@ -81,6 +84,9 @@ int main (int argc, char** argv)
t.ok (p2.is_directory (), "~ is_directory");
t.ok (p3.is_directory (), "/tmp is_directory");
// bool is_link () const;
t.notok (p2.is_link (), "~ !is_link");
// bool readable () const;
t.ok (p2.readable (), "~ readable");
t.ok (p3.readable (), "/tmp readable");