Unit Tests

- Not enough backslashes in the unit test, and taskwarrior will need to add
  an extra decode on Task::set and Task::addAnnotaiton.
This commit is contained in:
Paul Beckingham 2014-08-31 13:24:38 -04:00
parent 0f3a8073f0
commit 819d15b2a1

View file

@ -45,11 +45,11 @@ if (open my $fh, '>', $rc)
} }
# Bug 879: Backslash at end of description/annotation causes problems. # Bug 879: Backslash at end of description/annotation causes problems.
qx{../src/task rc:$rc add one\\\\ 2>&1}; qx{../src/task rc:$rc add one\\\\\\\\ 2>&1};
my $output = qx{../src/task rc:$rc long 2>&1}; my $output = qx{../src/task rc:$rc long 2>&1};
like ($output, qr/one\\/, "$ut: Backslash preserved in description"); like ($output, qr/one\\/, "$ut: Backslash preserved in description");
qx{../src/task rc:$rc 1 annotate foo\\\\ 2>&1}; qx{../src/task rc:$rc 1 annotate foo\\\\\\\\ 2>&1};
$output = qx{../src/task rc:$rc long 2>&1}; $output = qx{../src/task rc:$rc long 2>&1};
like ($output, qr/one\\/, "$ut: Backslash preserved in description"); like ($output, qr/one\\/, "$ut: Backslash preserved in description");
like ($output, qr/foo\\/, "$ut: Backslash preserved in annotation 1"); like ($output, qr/foo\\/, "$ut: Backslash preserved in annotation 1");