Unit Tests

- add.t contained a broken test that did not take into account a
  (working) substitution.
This commit is contained in:
Paul Beckingham 2011-07-31 13:34:10 -04:00
parent e61e08c2ca
commit ccd32cb7d6
2 changed files with 4 additions and 4 deletions

View file

@ -1457,7 +1457,7 @@ bool A3::is_pattern (Nibbler& n, std::string& result)
// two-directory absolute path, (or three-level, if the third directory is
// named 'g') can be misinterpreted. To help (but not solve) this, if a
// substition exists on the local disk, it is not considered a subst.
// This needs to be changed to a better solution.
// This needs to be changed to a better solution. When I think of one.
bool A3::is_subst (Nibbler& n, std::string& result)
{
n.save ();

View file

@ -48,12 +48,12 @@ like ($output, qr/Status\s+Pending\n/, 'add Pending');
like ($output, qr/UUID\s+[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\n/, 'add UUID');
# Test the /// modifier.
qx{../src/task rc:add.rc 1 /test/TEST/};
qx{../src/task rc:add.rc 1 "/is //"};
qx{../src/task rc:add.rc 1 modify /test/TEST/};
qx{../src/task rc:add.rc 1 modify "/is //"};
$output = qx{../src/task rc:add.rc info 1};
like ($output, qr/ID\s+1\n/, 'add ID');
like ($output, qr/Status\s+Pending\n/, 'add Pending');
like ($output, qr/Description\s+This is a TEST\n/, 'add Description');
like ($output, qr/Description\s+This a TEST\n/, 'add Description');
# Cleanup.
unlink 'pending.data';