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:
@@ -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");
|
||||||
|
|||||||
Reference in New Issue
Block a user