mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Added Path::is_link test
This commit is contained in:
parent
b522eecf8d
commit
9ae6c5ae7a
1 changed files with 7 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue