mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-30 22:43:24 +02:00
Added unit tests for bug fix #333
This commit is contained in:
parent
7f11f1b560
commit
2b44d513e8
1 changed files with 7 additions and 1 deletions
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 12;
|
||||
use Test::More tests => 15;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'dup.rc')
|
||||
|
@ -55,6 +55,12 @@ like ($output, qr/Description\s+FOO/, 'duplicate modified description');
|
|||
like ($output, qr/Priority\s+H/, 'duplicate added priority');
|
||||
like ($output, qr/Tags\s+tag/, 'duplicate added tag');
|
||||
|
||||
# Test the output of the duplicate command - returning id of duplicated task
|
||||
$output = qx{../task rc:dup.rc duplicate 1};
|
||||
like ($output, qr/Duplicated\s+1\s+'foo'/, 'duplicate output task id and description');
|
||||
like ($output, qr/Duplicated\s+1\s+task/, 'duplicate output number of tasks duplicated');
|
||||
like ($output, qr/Created\s+task\s+4/, 'duplicate output of new task id');
|
||||
|
||||
# Cleanup.
|
||||
unlink 'pending.data';
|
||||
ok (!-r 'pending.data', 'Removed pending.data');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue