Unit Tests

- Modified testing to accomodate new split between stdout/stderr.
This commit is contained in:
Paul Beckingham 2012-07-03 15:43:19 -04:00
parent 75822eed47
commit da575c4043
185 changed files with 1591 additions and 1591 deletions

View file

@ -42,18 +42,18 @@ if (open my $fh, '>', 'roundtrip.rc')
}
# Add two tasks.
qx{../src/task rc:roundtrip.rc add priority:H project:A one};
qx{../src/task rc:roundtrip.rc add +tag1 +tag2 two};
qx{../src/task rc:roundtrip.rc add priority:H project:A one 2>&1};
qx{../src/task rc:roundtrip.rc add +tag1 +tag2 two 2>&1};
# trip 1.
qx{../src/task rc:roundtrip.rc export > ./roundtrip.txt};
qx{../src/task rc:roundtrip.rc export > ./roundtrip.txt 2>&1};
unlink 'pending.data', 'completed.data', 'undo.data';
qx{../src/task rc:roundtrip.rc rc.debug:1 import ./roundtrip.txt};
qx{../src/task rc:roundtrip.rc rc.debug:1 import ./roundtrip.txt 2>&1};
# trip 2.
qx{../src/task rc:roundtrip.rc export > ./roundtrip.txt};
qx{../src/task rc:roundtrip.rc export > ./roundtrip.txt 2>&1};
unlink 'pending.data', 'completed.data', 'undo.data';
qx{../src/task rc:roundtrip.rc import ./roundtrip.txt};
qx{../src/task rc:roundtrip.rc import ./roundtrip.txt 2>&1};
# Exammine.
@ -61,7 +61,7 @@ qx{../src/task rc:roundtrip.rc import ./roundtrip.txt};
# -- ------- --- -------- ------- --- ----- --------- --- ---- --------- ---------
# 1 A H 8/7/2010 - one
# 2 8/7/2010 - tag1 tag2 two
my $output = qx{../src/task rc:roundtrip.rc long};
my $output = qx{../src/task rc:roundtrip.rc long 2>&1};
like ($output, qr/1.+A.+H.+\d+\/\d+\/\d+.+(?:-|\d+).+one/, '2 round trips task 1 identical');
like ($output, qr/2.+\d+\/\d+\/\d+.+(?:-|\d+).+tag1\stag2\stwo/, '2 round trips task 2 identical');