diff --git a/test/abbreviation.t b/test/abbreviation.t index 5d8ea42ce..9cbdbdeb5 100755 --- a/test/abbreviation.t +++ b/test/abbreviation.t @@ -40,53 +40,53 @@ if (open my $fh, '>', 'abbrev.rc') } # Test the priority attribute abbrevations. -qx{../src/task rc:abbrev.rc add priority:H with}; -qx{../src/task rc:abbrev.rc add without}; +qx{../src/task rc:abbrev.rc add priority:H with 2>&1}; +qx{../src/task rc:abbrev.rc add without 2>&1}; -my $output = qx{../src/task rc:abbrev.rc list priority:H}; +my $output = qx{../src/task rc:abbrev.rc list priority:H 2>&1}; like ($output, qr/\bwith\b/, 'priority:H with'); unlike ($output, qr/\bwithout\b/, 'priority:H without'); -$output = qx{../src/task rc:abbrev.rc list priorit:H}; +$output = qx{../src/task rc:abbrev.rc list priorit:H 2>&1}; like ($output, qr/\bwith\b/, 'priorit:H with'); unlike ($output, qr/\bwithout\b/, 'priorit:H without'); -$output = qx{../src/task rc:abbrev.rc list priori:H}; +$output = qx{../src/task rc:abbrev.rc list priori:H 2>&1}; like ($output, qr/\bwith\b/, 'priori:H with'); unlike ($output, qr/\bwithout\b/, 'priori:H without'); -$output = qx{../src/task rc:abbrev.rc list prior:H}; +$output = qx{../src/task rc:abbrev.rc list prior:H 2>&1}; like ($output, qr/\bwith\b/, 'prior:H with'); unlike ($output, qr/\bwithout\b/, 'prior:H without'); -$output = qx{../src/task rc:abbrev.rc list prio:H}; +$output = qx{../src/task rc:abbrev.rc list prio:H 2>&1}; like ($output, qr/\bwith\b/, 'prio:H with'); unlike ($output, qr/\bwithout\b/, 'prio:H without'); -$output = qx{../src/task rc:abbrev.rc list pri:H}; +$output = qx{../src/task rc:abbrev.rc list pri:H 2>&1}; like ($output, qr/\bwith\b/, 'pri:H with'); unlike ($output, qr/\bwithout\b/, 'pri:H without'); # Test the version command abbreviations. -$output = qx{../src/task rc:abbrev.rc version}; +$output = qx{../src/task rc:abbrev.rc version 2>&1}; like ($output, qr/MIT\s+license/, 'version'); -$output = qx{../src/task rc:abbrev.rc versio}; +$output = qx{../src/task rc:abbrev.rc versio 2>&1}; like ($output, qr/MIT\s+license/, 'version'); -$output = qx{../src/task rc:abbrev.rc versi}; +$output = qx{../src/task rc:abbrev.rc versi 2>&1}; like ($output, qr/MIT\s+license/, 'version'); -$output = qx{../src/task rc:abbrev.rc vers}; +$output = qx{../src/task rc:abbrev.rc vers 2>&1}; like ($output, qr/MIT\s+license/, 'version'); -$output = qx{../src/task rc:abbrev.rc ver}; +$output = qx{../src/task rc:abbrev.rc ver 2>&1}; like ($output, qr/MIT\s+license/, 'version'); -$output = qx{../src/task rc:abbrev.rc ve}; +$output = qx{../src/task rc:abbrev.rc ve 2>&1}; like ($output, qr/MIT\s+license/, 'version'); -$output = qx{../src/task rc:abbrev.rc v}; +$output = qx{../src/task rc:abbrev.rc v 2>&1}; like ($output, qr/MIT\s+license/, 'version'); # Cleanup. diff --git a/test/add.t b/test/add.t index 51b9ad373..e02b01934 100755 --- a/test/add.t +++ b/test/add.t @@ -40,17 +40,17 @@ if (open my $fh, '>', 'add.rc') } # Test the add command. -qx{../src/task rc:add.rc add This is a test}; -my $output = qx{../src/task rc:add.rc info 1}; +qx{../src/task rc:add.rc add This is a test 2>&1}; +my $output = qx{../src/task rc:add.rc info 1 2>&1}; like ($output, qr/ID\s+1\n/, 'add ID'); like ($output, qr/Description\s+This is a test\n/, 'add ID'); 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 modify /test/TEST/}; -qx{../src/task rc:add.rc 1 modify "/is //"}; -$output = qx{../src/task rc:add.rc info 1}; +qx{../src/task rc:add.rc 1 modify /test/TEST/ 2>&1}; +qx{../src/task rc:add.rc 1 modify "/is //" 2>&1}; +$output = qx{../src/task rc:add.rc info 1 2>&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 a TEST\n/, 'add Description'); diff --git a/test/alias.t b/test/alias.t index a74f21b14..5bc7527b2 100755 --- a/test/alias.t +++ b/test/alias.t @@ -41,15 +41,15 @@ if (open my $fh, '>', 'alias.rc') } # Add a task with certain project, then access that task via aliases. -qx{../src/task rc:alias.rc add project:ALIAS foo}; +qx{../src/task rc:alias.rc add project:ALIAS foo 2>&1}; -my $output = qx{../src/task rc:alias.rc _projects}; +my $output = qx{../src/task rc:alias.rc _projects 2>&1}; like ($output, qr/ALIAS/, 'task _projects -> ALIAS'); -$output = qx{../src/task rc:alias.rc foo}; +$output = qx{../src/task rc:alias.rc foo 2>&1}; like ($output, qr/ALIAS/, 'task foo -> _projects -> ALIAS'); -$output = qx{../src/task rc:alias.rc bar}; +$output = qx{../src/task rc:alias.rc bar 2>&1}; like ($output, qr/ALIAS/, 'task bar -> foo -> _projects -> ALIAS'); # Cleanup. diff --git a/test/annotate.t b/test/annotate.t index bfa90e34d..f05473be0 100755 --- a/test/annotate.t +++ b/test/annotate.t @@ -46,18 +46,18 @@ if (open my $fh, '>', 'annotate.rc') } # Add four tasks, annotate one three times, one twice, one just once and one none. -qx{../src/task rc:annotate.rc add one}; -qx{../src/task rc:annotate.rc add two}; -qx{../src/task rc:annotate.rc add three}; -qx{../src/task rc:annotate.rc add four}; -qx{../src/task rc:annotate.rc 1 annotate foo1}; -qx{../src/task rc:annotate.rc 1 annotate foo2}; -qx{../src/task rc:annotate.rc 1 annotate foo3}; -qx{../src/task rc:annotate.rc 2 annotate bar1}; -qx{../src/task rc:annotate.rc 2 annotate bar2}; -qx{../src/task rc:annotate.rc 3 annotate baz1}; +qx{../src/task rc:annotate.rc add one 2>&1}; +qx{../src/task rc:annotate.rc add two 2>&1}; +qx{../src/task rc:annotate.rc add three 2>&1}; +qx{../src/task rc:annotate.rc add four 2>&1}; +qx{../src/task rc:annotate.rc 1 annotate foo1 2>&1}; +qx{../src/task rc:annotate.rc 1 annotate foo2 2>&1}; +qx{../src/task rc:annotate.rc 1 annotate foo3 2>&1}; +qx{../src/task rc:annotate.rc 2 annotate bar1 2>&1}; +qx{../src/task rc:annotate.rc 2 annotate bar2 2>&1}; +qx{../src/task rc:annotate.rc 3 annotate baz1 2>&1}; -my $output = qx{../src/task rc:annotate.rc rrr}; +my $output = qx{../src/task rc:annotate.rc rrr 2>&1}; # ID Description # -- ------------------------------- @@ -100,7 +100,7 @@ if (open my $fh, '>', 'annotate2.rc') ok (-r 'annotate2.rc', 'Created annotate2.rc'); } -$output = qx{../src/task rc:annotate2.rc rrr}; +$output = qx{../src/task rc:annotate2.rc rrr 2>&1}; like ($output, qr/1 one/, 'task 1'); # 14 like ($output, qr/2 two/, 'task 2'); like ($output, qr/3 three/, 'task 3'); diff --git a/test/append.t b/test/append.t index 449ca00c7..1c023e21e 100755 --- a/test/append.t +++ b/test/append.t @@ -40,13 +40,13 @@ if (open my $fh, '>', 'append.rc') } # Add a task, then append more description. -qx{../src/task rc:append.rc add foo}; -qx{../src/task rc:append.rc 1 append bar}; -my $output = qx{../src/task rc:append.rc info 1}; +qx{../src/task rc:append.rc add foo 2>&1}; +qx{../src/task rc:append.rc 1 append bar 2>&1}; +my $output = qx{../src/task rc:append.rc info 1 2>&1}; like ($output, qr/Description\s+foo\sbar\n/, 'append worked'); # Should cause an error when nothing is appended. -$output = qx{../src/task rc:append.rc 1 append}; +$output = qx{../src/task rc:append.rc 1 append 2>&1}; unlike ($output, qr/Appended 0 tasks/, 'blank append failed'); # Cleanup. diff --git a/test/args.1.t b/test/args.1.t index 26fcc5dc9..ba9bb4d9c 100755 --- a/test/args.1.t +++ b/test/args.1.t @@ -40,18 +40,18 @@ if (open my $fh, '>', 'args.rc') } # Test id before command, and id after command. -qx{../src/task rc:args.rc add one}; -qx{../src/task rc:args.rc add two}; -qx{../src/task rc:args.rc add three}; -my $output = qx{../src/task rc:args.rc list}; +qx{../src/task rc:args.rc add one 2>&1}; +qx{../src/task rc:args.rc add two 2>&1}; +qx{../src/task rc:args.rc add three 2>&1}; +my $output = qx{../src/task rc:args.rc list 2>&1}; like ($output, qr/one/, 'task 1 added'); like ($output, qr/two/, 'task 2 added'); like ($output, qr/three/, 'task 3 added'); -$output = qx{../src/task rc:args.rc 1 done}; +$output = qx{../src/task rc:args.rc 1 done 2>&1}; like ($output, qr/^Completed 1 /ms, 'COMMAND after ID'); -$output = qx{../src/task rc:args.rc done 2}; +$output = qx{../src/task rc:args.rc done 2 2>&1}; unlike ($output, qr/^Completed 2 /ms, 'ID after COMMAND'); # Cleanup. diff --git a/test/args.2.t b/test/args.2.t index c7f2c63d1..2c16997e4 100755 --- a/test/args.2.t +++ b/test/args.2.t @@ -40,30 +40,30 @@ if (open my $fh, '>', 'args.rc') } # Test 'done' with en-passant changes. -qx{../src/task rc:args.rc add one}; -qx{../src/task rc:args.rc add two}; -qx{../src/task rc:args.rc add three}; -qx{../src/task rc:args.rc add four}; -qx{../src/task rc:args.rc add five}; +qx{../src/task rc:args.rc add one 2>&1}; +qx{../src/task rc:args.rc add two 2>&1}; +qx{../src/task rc:args.rc add three 2>&1}; +qx{../src/task rc:args.rc add four 2>&1}; +qx{../src/task rc:args.rc add five 2>&1}; -qx{../src/task rc:args.rc 1 done oneanno}; -my $output = qx{../src/task rc:args.rc 1 info}; +qx{../src/task rc:args.rc 1 done oneanno 2>&1}; +my $output = qx{../src/task rc:args.rc 1 info 2>&1}; like ($output, qr/oneanno/, 'done enpassant anno'); -qx{../src/task rc:args.rc 2 done /two/TWO/}; -$output = qx{../src/task rc:args.rc 2 info}; +qx{../src/task rc:args.rc 2 done /two/TWO/ 2>&1}; +$output = qx{../src/task rc:args.rc 2 info 2>&1}; like ($output, qr/Description\s+TWO/, 'done enpassant subst'); -qx{../src/task rc:args.rc 3 done +threetag}; -$output = qx{../src/task rc:args.rc 3 info}; +qx{../src/task rc:args.rc 3 done +threetag 2>&1}; +$output = qx{../src/task rc:args.rc 3 info 2>&1}; like ($output, qr/Tags\s+threetag/, 'done enpassant tag'); -qx{../src/task rc:args.rc 4 done pri:H}; -$output = qx{../src/task rc:args.rc 4 info}; +qx{../src/task rc:args.rc 4 done pri:H 2>&1}; +$output = qx{../src/task rc:args.rc 4 info 2>&1}; like ($output, qr/Priority\s+H/, 'done enpassant priority'); -qx{../src/task rc:args.rc 5 done pro:A}; -$output = qx{../src/task rc:args.rc 5 info}; +qx{../src/task rc:args.rc 5 done pro:A 2>&1}; +$output = qx{../src/task rc:args.rc 5 info 2>&1}; like ($output, qr/Project\s+A/, 'done enpassant project'); # Cleanup. diff --git a/test/args.3.t b/test/args.3.t index 428c3c8b3..ac73ddc01 100755 --- a/test/args.3.t +++ b/test/args.3.t @@ -40,30 +40,30 @@ if (open my $fh, '>', 'args.rc') } # Test 'delete' with en-passant changes. -qx{../src/task rc:args.rc add one}; -qx{../src/task rc:args.rc add two}; -qx{../src/task rc:args.rc add three}; -qx{../src/task rc:args.rc add four}; -qx{../src/task rc:args.rc add five}; +qx{../src/task rc:args.rc add one 2>&1}; +qx{../src/task rc:args.rc add two 2>&1}; +qx{../src/task rc:args.rc add three 2>&1}; +qx{../src/task rc:args.rc add four 2>&1}; +qx{../src/task rc:args.rc add five 2>&1}; -qx{../src/task rc:args.rc 1 delete oneanno}; -my $output = qx{../src/task rc:args.rc 1 info}; +qx{../src/task rc:args.rc 1 delete oneanno 2>&1}; +my $output = qx{../src/task rc:args.rc 1 info 2>&1}; like ($output, qr/oneanno/, 'delete enpassant anno'); -qx{../src/task rc:args.rc 2 delete /two/TWO/}; -$output = qx{../src/task rc:args.rc 2 info}; +qx{../src/task rc:args.rc 2 delete /two/TWO/ 2>&1}; +$output = qx{../src/task rc:args.rc 2 info 2>&1}; like ($output, qr/Description\s+TWO/, 'delete enpassant subst'); -qx{../src/task rc:args.rc 3 delete +threetag}; -$output = qx{../src/task rc:args.rc 3 info}; +qx{../src/task rc:args.rc 3 delete +threetag 2>&1}; +$output = qx{../src/task rc:args.rc 3 info 2>&1}; like ($output, qr/Tags\s+threetag/, 'delete enpassant tag'); -qx{../src/task rc:args.rc 4 delete pri:H}; -$output = qx{../src/task rc:args.rc 4 info}; +qx{../src/task rc:args.rc 4 delete pri:H 2>&1}; +$output = qx{../src/task rc:args.rc 4 info 2>&1}; like ($output, qr/Priority\s+H/, 'delete enpassant priority'); -qx{../src/task rc:args.rc 5 delete pro:A}; -$output = qx{../src/task rc:args.rc 5 info}; +qx{../src/task rc:args.rc 5 delete pro:A 2>&1}; +$output = qx{../src/task rc:args.rc 5 info 2>&1}; like ($output, qr/Project\s+A/, 'delete enpassant project'); # Cleanup. diff --git a/test/args.4.t b/test/args.4.t index 1c9ab900c..2f058393e 100755 --- a/test/args.4.t +++ b/test/args.4.t @@ -40,30 +40,30 @@ if (open my $fh, '>', 'args.rc') } # Test 'start' with en-passant changes. -qx{../src/task rc:args.rc add one}; -qx{../src/task rc:args.rc add two}; -qx{../src/task rc:args.rc add three}; -qx{../src/task rc:args.rc add four}; -qx{../src/task rc:args.rc add five}; +qx{../src/task rc:args.rc add one 2>&1}; +qx{../src/task rc:args.rc add two 2>&1}; +qx{../src/task rc:args.rc add three 2>&1}; +qx{../src/task rc:args.rc add four 2>&1}; +qx{../src/task rc:args.rc add five 2>&1}; -qx{../src/task rc:args.rc 1 start oneanno}; -my $output = qx{../src/task rc:args.rc 1 info}; +qx{../src/task rc:args.rc 1 start oneanno 2>&1}; +my $output = qx{../src/task rc:args.rc 1 info 2>&1}; like ($output, qr/oneanno/, 'start enpassant anno'); -qx{../src/task rc:args.rc 2 start /two/TWO/}; -$output = qx{../src/task rc:args.rc 2 info}; +qx{../src/task rc:args.rc 2 start /two/TWO/ 2>&1}; +$output = qx{../src/task rc:args.rc 2 info 2>&1}; like ($output, qr/Description\s+TWO/, 'start enpassant subst'); -qx{../src/task rc:args.rc 3 start +threetag}; -$output = qx{../src/task rc:args.rc 3 info}; +qx{../src/task rc:args.rc 3 start +threetag 2>&1}; +$output = qx{../src/task rc:args.rc 3 info 2>&1}; like ($output, qr/Tags\s+threetag/, 'start enpassant tag'); -qx{../src/task rc:args.rc 4 start pri:H}; -$output = qx{../src/task rc:args.rc 4 info}; +qx{../src/task rc:args.rc 4 start pri:H 2>&1}; +$output = qx{../src/task rc:args.rc 4 info 2>&1}; like ($output, qr/Priority\s+H/, 'start enpassant priority'); -qx{../src/task rc:args.rc 5 start pro:A}; -$output = qx{../src/task rc:args.rc 5 info}; +qx{../src/task rc:args.rc 5 start pro:A 2>&1}; +$output = qx{../src/task rc:args.rc 5 info 2>&1}; like ($output, qr/Project\s+A/, 'start enpassant project'); # Cleanup. diff --git a/test/args.5.t b/test/args.5.t index 8f6d26e2e..be4a1d410 100755 --- a/test/args.5.t +++ b/test/args.5.t @@ -40,36 +40,36 @@ if (open my $fh, '>', 'args.rc') } # Test 'stop' with en-passant changes. -qx{../src/task rc:args.rc add one}; -qx{../src/task rc:args.rc add two}; -qx{../src/task rc:args.rc add three}; -qx{../src/task rc:args.rc add four}; -qx{../src/task rc:args.rc add five}; +qx{../src/task rc:args.rc add one 2>&1}; +qx{../src/task rc:args.rc add two 2>&1}; +qx{../src/task rc:args.rc add three 2>&1}; +qx{../src/task rc:args.rc add four 2>&1}; +qx{../src/task rc:args.rc add five 2>&1}; -qx{../src/task rc:args.rc 1 start}; -qx{../src/task rc:args.rc 2 start}; -qx{../src/task rc:args.rc 3 start}; -qx{../src/task rc:args.rc 4 start}; -qx{../src/task rc:args.rc 5 start}; +qx{../src/task rc:args.rc 1 start 2>&1}; +qx{../src/task rc:args.rc 2 start 2>&1}; +qx{../src/task rc:args.rc 3 start 2>&1}; +qx{../src/task rc:args.rc 4 start 2>&1}; +qx{../src/task rc:args.rc 5 start 2>&1}; -qx{../src/task rc:args.rc 1 stop oneanno}; -my $output = qx{../src/task rc:args.rc 1 info}; +qx{../src/task rc:args.rc 1 stop oneanno 2>&1}; +my $output = qx{../src/task rc:args.rc 1 info 2>&1}; like ($output, qr/oneanno/, 'stop enpassant anno'); -qx{../src/task rc:args.rc 2 stop /two/TWO/}; -$output = qx{../src/task rc:args.rc 2 info}; +qx{../src/task rc:args.rc 2 stop /two/TWO/ 2>&1}; +$output = qx{../src/task rc:args.rc 2 info 2>&1}; like ($output, qr/Description\s+TWO/, 'stop enpassant subst'); -qx{../src/task rc:args.rc 3 stop +threetag}; -$output = qx{../src/task rc:args.rc 3 info}; +qx{../src/task rc:args.rc 3 stop +threetag 2>&1}; +$output = qx{../src/task rc:args.rc 3 info 2>&1}; like ($output, qr/Tags\s+threetag/, 'stop enpassant tag'); -qx{../src/task rc:args.rc 4 stop pri:H}; -$output = qx{../src/task rc:args.rc 4 info}; +qx{../src/task rc:args.rc 4 stop pri:H 2>&1}; +$output = qx{../src/task rc:args.rc 4 info 2>&1}; like ($output, qr/Priority\s+H/, 'stop enpassant priority'); -qx{../src/task rc:args.rc 5 stop pro:A}; -$output = qx{../src/task rc:args.rc 5 info}; +qx{../src/task rc:args.rc 5 stop pro:A 2>&1}; +$output = qx{../src/task rc:args.rc 5 info 2>&1}; like ($output, qr/Project\s+A/, 'stop enpassant project'); # Cleanup. diff --git a/test/args.t b/test/args.t index fa1cfb627..a3019ab07 100755 --- a/test/args.t +++ b/test/args.t @@ -40,24 +40,24 @@ if (open my $fh, '>', 'args.rc') } # Test the -- argument. -qx{../src/task rc:args.rc add project:p pri:H +tag foo}; -my $output = qx{../src/task rc:args.rc info 1}; +qx{../src/task rc:args.rc add project:p pri:H +tag foo 2>&1}; +my $output = qx{../src/task rc:args.rc info 1 2>&1}; like ($output, qr/Description\s+foo\n/ms, 'task add project:p pri:H +tag foo'); -qx{../src/task rc:args.rc 1 modify project:p pri:H +tag -- foo}; -$output = qx{../src/task rc:args.rc info 1}; +qx{../src/task rc:args.rc 1 modify project:p pri:H +tag -- foo 2>&1}; +$output = qx{../src/task rc:args.rc info 1 2>&1}; like ($output, qr/Description\s+foo\n/ms, 'task 1 modify project:p pri:H +tag -- foo'); -qx{../src/task rc:args.rc 1 modify project:p pri:H -- +tag foo}; -$output = qx{../src/task rc:args.rc info 1}; +qx{../src/task rc:args.rc 1 modify project:p pri:H -- +tag foo 2>&1}; +$output = qx{../src/task rc:args.rc info 1 2>&1}; like ($output, qr/Description\s+\+tag\sfoo\n/ms, 'task 1 modify project:p pri:H -- +tag foo'); -qx{../src/task rc:args.rc 1 modify project:p -- pri:H +tag foo}; -$output = qx{../src/task rc:args.rc info 1}; +qx{../src/task rc:args.rc 1 modify project:p -- pri:H +tag foo 2>&1}; +$output = qx{../src/task rc:args.rc info 1 2>&1}; like ($output, qr/Description\s+pri:H\s\+tag\sfoo\n/ms, 'task 1 modify project:p -- pri:H +tag foo'); -qx{../src/task rc:args.rc 1 modify -- project:p pri:H +tag foo}; -$output = qx{../src/task rc:args.rc info 1}; +qx{../src/task rc:args.rc 1 modify -- project:p pri:H +tag foo 2>&1}; +$output = qx{../src/task rc:args.rc info 1 2>&1}; like ($output, qr/Description\s+project:p\spri:H\s\+tag\sfoo\n/ms, 'task 1 modify -- project:p pri:H +tag foo'); # Cleanup. diff --git a/test/backslash.t b/test/backslash.t index 20b722fa8..06649a889 100755 --- a/test/backslash.t +++ b/test/backslash.t @@ -39,8 +39,8 @@ if (open my $fh, '>', 'backslash.rc') } # Add a description with a backslash. -qx{../src/task rc:backslash.rc add \\\\}; -my $output = qx{../src/task rc:backslash.rc ls}; +qx{../src/task rc:backslash.rc add \\\\ 2>&1}; +my $output = qx{../src/task rc:backslash.rc ls 2>&1}; like ($output, qr/\\/, 'Backslash preserved, no parsing issues'); # Cleanup. diff --git a/test/basic.t b/test/basic.t index 470dafd33..6e0615e40 100755 --- a/test/basic.t +++ b/test/basic.t @@ -47,13 +47,13 @@ my $output = qx{../src/task rc:basic.rc 2>&1 >/dev/null}; like ($output, qr/You must specify a command or a task to modify./m, 'missing command and ID'); # Test the version command. -$output = qx{../src/task rc:basic.rc version}; +$output = qx{../src/task rc:basic.rc version 2>&1}; like ($output, qr/task $version/, 'version - task version number'); like ($output, qr/MIT\slicense/, 'version - license'); like ($output, qr/http:\/\/taskwarrior\.org/, 'version - url'); # Test the _version command. -$output = qx{../src/task rc:basic.rc _version}; +$output = qx{../src/task rc:basic.rc _version 2>&1}; like ($output, qr/$version/, '_version - task version number'); # Cleanup. diff --git a/test/bug.1006.t b/test/bug.1006.t index b55dec459..bd9981cb4 100755 --- a/test/bug.1006.t +++ b/test/bug.1006.t @@ -43,16 +43,16 @@ if (open my $fh, '>', 'bug.rc') # This is because DOM elements are checked before standard words when strings # are tokenized. -qx{../src/task rc:bug.rc add des}; -qx{../src/task rc:bug.rc 1 annotate des}; -my $output = qx{../src/task rc:bug.rc 1 info}; +qx{../src/task rc:bug.rc add des 2>&1}; +qx{../src/task rc:bug.rc 1 annotate des 2>&1}; +my $output = qx{../src/task rc:bug.rc 1 info 2>&1}; unlike ($output, qr/description/ms, 'Attribute not completed in description'); -$output = qx{../src/task test rc:bug.rc rc.report.test.columns:description rc.report.test.labels:__}; +$output = qx{../src/task test rc:bug.rc rc.report.test.columns:description rc.report.test.labels:__ 2>&1}; like ($output, qr/__/ms, 'Custom column present in the output'); -$output = qx{../src/task rc:bug.rc add entrée interdite}; -$output = qx{../src/task rc:bug.rc list interdite}; +$output = qx{../src/task rc:bug.rc add entrée interdite 2>&1}; +$output = qx{../src/task rc:bug.rc list interdite 2>&1}; like ($output, qr/entrée interdite/, "'entrée' left intact"); # Cleanup. diff --git a/test/bug.299.t b/test/bug.299.t index cef01603b..512a1a080 100755 --- a/test/bug.299.t +++ b/test/bug.299.t @@ -40,13 +40,13 @@ if (open my $fh, '>', 'bug.rc') } # Setup: Add three unique tasks with different project names. -qx{../src/task rc:bug.rc add project:one foo}; -qx{../src/task rc:bug.rc add project:two bar}; -qx{../src/task rc:bug.rc add project:three baz}; +qx{../src/task rc:bug.rc add project:one foo 2>&1}; +qx{../src/task rc:bug.rc add project:two bar 2>&1}; +qx{../src/task rc:bug.rc add project:three baz 2>&1}; # Result: Run list but exclude two of the three projects names using # project.hasnt: -my $output = qx{../src/task rc:bug.rc list project.isnt:one project.isnt:two}; +my $output = qx{../src/task rc:bug.rc list project.isnt:one project.isnt:two 2>&1}; unlike ($output, qr/one.*foo/ms, 'project.isnt:one project.isnt:two - no foo'); unlike ($output, qr/two.*bar/ms, 'project.isnt:one project.isnt:two - no bar'); like ($output, qr/three.*baz/ms, 'project.isnt:one project.isnt:two - yes baz'); diff --git a/test/bug.327.t b/test/bug.327.t index 77103b125..3691cf4e5 100755 --- a/test/bug.327.t +++ b/test/bug.327.t @@ -40,13 +40,13 @@ if (open my $fh, '>', 'bug.rc') } # Setup: Add a recurring task then remove the due date. -qx{../src/task rc:bug.rc add foo recur:yearly due:eoy}; -qx{../src/task rc:bug.rc li}; -qx{../src/task rc:bug.rc 2 modify due:}; +qx{../src/task rc:bug.rc add foo recur:yearly due:eoy 2>&1}; +qx{../src/task rc:bug.rc li 2>&1}; +qx{../src/task rc:bug.rc 2 modify due: 2>&1}; # Result: Somehow the due date is incremented and wraps around to 12/31/1969, # then keeps going back to today. -my $output = qx{../src/task rc:bug.rc li}; +my $output = qx{../src/task rc:bug.rc li 2>&1}; unlike ($output, qr/1969/ms, 'Should not display 12/31/1969'); # Cleanup. diff --git a/test/bug.360.t b/test/bug.360.t index 9ded5c1f0..1e69d64f1 100755 --- a/test/bug.360.t +++ b/test/bug.360.t @@ -40,8 +40,8 @@ if (open my $fh, '>', 'bug.rc') } # Setup: Add a recurring task, generate an instance, then add a project. -qx{../src/task rc:bug.rc add foo due:tomorrow recur:daily}; -qx{../src/task rc:bug.rc ls}; +qx{../src/task rc:bug.rc add foo due:tomorrow recur:daily 2>&1}; +qx{../src/task rc:bug.rc ls 2>&1}; # Result: trying to add the project generates an error about removing # recurrence from a task. @@ -60,13 +60,13 @@ $output = qx{../src/task rc:bug.rc 2 modify due: 2>&1 >/dev/null}; like ($output, qr/You cannot remove the due date from a recurring task./ms, 'Cannot remove due date from a recurring task'); # Allow removal of the due date from a non-recurring task. -qx{../src/task rc:bug.rc add nonrecurring}; -$output = qx{../src/task rc:bug.rc ls}; +qx{../src/task rc:bug.rc add nonrecurring 2>&1}; +$output = qx{../src/task rc:bug.rc ls 2>&1}; my ($id) = $output =~ /(\d+)\s+nonrecurring/; $output = qx{../src/task rc:bug.rc $id modify due: 2>&1 >/dev/null}; unlike ($output, qr/You cannot remove the due date from a recurring task./ms, 'Can remove due date from a non-recurring task'); -$output = qx{../src/task rc:bug.rc diag}; +$output = qx{../src/task rc:bug.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/bug.368.t b/test/bug.368.t index ddbf2aa49..792de01c5 100755 --- a/test/bug.368.t +++ b/test/bug.368.t @@ -41,8 +41,8 @@ if (open my $fh, '>', 'bug.rc') } # Setup: Add a recurring task, generate an instance, then add a project. -qx{../src/task rc:bug.rc add foo due:today recur:daily until:eom}; -my $output = qx{../src/task rc:bug.rc info 1}; +qx{../src/task rc:bug.rc add foo due:today recur:daily until:eom 2>&1}; +my $output = qx{../src/task rc:bug.rc info 1 2>&1}; # Result: Make sure the 'until' date is rendered as a date, not an epoch. unlike ($output, qr/Until\s+\d{10}/, 'until is not shown as an epoch'); diff --git a/test/bug.414.t b/test/bug.414.t index 643c38453..465aa8785 100755 --- a/test/bug.414.t +++ b/test/bug.414.t @@ -41,19 +41,19 @@ if (open my $fh, '>', 'bug.rc') # Bug #414: Tags filtering not working with unicode characters # Add a task with a UTF-8 tag. -qx{../src/task rc:bug.rc add one +osobní}; -my $output = qx{../src/task rc:bug.rc ls +osobní}; +qx{../src/task rc:bug.rc add one +osobní 2>&1}; +my $output = qx{../src/task rc:bug.rc ls +osobní 2>&1}; like ($output, qr/one/, 'found UTF8 tag osobní'); -$output = qx{../src/task rc:bug.rc ls -osobní}; +$output = qx{../src/task rc:bug.rc ls -osobní 2>&1}; unlike ($output, qr/one/, 'not found UTF8 tag osobní'); # And a different one -qx{../src/task rc:bug.rc add two +föo}; -$output = qx{../src/task rc:bug.rc ls +föo}; +qx{../src/task rc:bug.rc add two +föo 2>&1}; +$output = qx{../src/task rc:bug.rc ls +föo 2>&1}; like ($output, qr/two/, 'found UTF8 tag föo'); -$output = qx{../src/task rc:bug.rc ls -föo}; +$output = qx{../src/task rc:bug.rc ls -föo 2>&1}; unlike ($output, qr/two/, 'not found UTF8 tag föo'); # Cleanup. diff --git a/test/bug.417.t b/test/bug.417.t index 244478b2a..db72c7eeb 100755 --- a/test/bug.417.t +++ b/test/bug.417.t @@ -40,14 +40,14 @@ if (open my $fh, '>', 'bug.rc') } # Bug #417: Sorting by countdown_compact not working -qx{../src/task rc:bug.rc add due:yesterday before}; -qx{../src/task rc:bug.rc add due:today now}; -qx{../src/task rc:bug.rc add due:tomorrow after}; +qx{../src/task rc:bug.rc add due:yesterday before 2>&1}; +qx{../src/task rc:bug.rc add due:today now 2>&1}; +qx{../src/task rc:bug.rc add due:tomorrow after 2>&1}; -my $output = qx{../src/task rc:bug.rc rc.report.long.sort:due+ long}; +my $output = qx{../src/task rc:bug.rc rc.report.long.sort:due+ long 2>&1}; like ($output, qr/before.+now.+after/ms, 'rc.report.long.sort:due+ works'); -$output = qx{../src/task rc:bug.rc rc.report.long.sort:due- long}; +$output = qx{../src/task rc:bug.rc rc.report.long.sort:due- long 2>&1}; like ($output, qr/after.+now.+before/ms, 'rc.report.long.sort:due- works'); # Cleanup. diff --git a/test/bug.418.t b/test/bug.418.t index 605325eb3..ff4c220bc 100755 --- a/test/bug.418.t +++ b/test/bug.418.t @@ -47,17 +47,17 @@ if (open my $fh, '>', 'bug.rc') # Bug #418: due.before:eow not working # - with dateformat 'MD' -qx{../src/task rc:bug.rc add one due:6/28/2010}; -qx{../src/task rc:bug.rc add two due:6/29/2010}; -qx{../src/task rc:bug.rc add three due:6/30/2010}; -qx{../src/task rc:bug.rc add four due:7/1/2010}; -qx{../src/task rc:bug.rc add five due:7/2/2010}; -qx{../src/task rc:bug.rc add six due:7/3/2010}; -qx{../src/task rc:bug.rc add seven due:7/4/2010}; -qx{../src/task rc:bug.rc add eight due:7/5/2010}; -qx{../src/task rc:bug.rc add nine due:7/6/2010}; +qx{../src/task rc:bug.rc add one due:6/28/2010 2>&1}; +qx{../src/task rc:bug.rc add two due:6/29/2010 2>&1}; +qx{../src/task rc:bug.rc add three due:6/30/2010 2>&1}; +qx{../src/task rc:bug.rc add four due:7/1/2010 2>&1}; +qx{../src/task rc:bug.rc add five due:7/2/2010 2>&1}; +qx{../src/task rc:bug.rc add six due:7/3/2010 2>&1}; +qx{../src/task rc:bug.rc add seven due:7/4/2010 2>&1}; +qx{../src/task rc:bug.rc add eight due:7/5/2010 2>&1}; +qx{../src/task rc:bug.rc add nine due:7/6/2010 2>&1}; -my $output = qx{../src/task rc:bug.rc foo}; +my $output = qx{../src/task rc:bug.rc foo 2>&1}; like ($output, qr/one/ms, 'task 1 listed'); like ($output, qr/two/ms, 'task 2 listed'); like ($output, qr/three/ms, 'task 3 listed'); @@ -68,7 +68,7 @@ like ($output, qr/seven/ms, 'task 7 listed'); like ($output, qr/eight/ms, 'task 8 listed'); like ($output, qr/nine/ms, 'task 9 listed'); -$output = qx{../src/task rc:bug.rc foo due.before:7/2/2010}; +$output = qx{../src/task rc:bug.rc foo due.before:7/2/2010 2>&1}; like ($output, qr/one/ms, 'task 1 listed'); like ($output, qr/two/ms, 'task 2 listed'); like ($output, qr/three/ms, 'task 3 listed'); diff --git a/test/bug.425.t b/test/bug.425.t index 16240d1c8..1697355aa 100755 --- a/test/bug.425.t +++ b/test/bug.425.t @@ -45,10 +45,10 @@ if (open my $fh, '>', '425.rc') # Create a task and attempt to revise the description to include the word 'in' # (this breaks in 1.9.3 and earlier) -qx{../src/task rc:425.rc add Foo}; -qx{../src/task rc:425.rc 1 modify Bar in Bar}; +qx{../src/task rc:425.rc add Foo 2>&1}; +qx{../src/task rc:425.rc 1 modify Bar in Bar 2>&1}; -my $output = qx{../src/task rc:425.rc 1 ls}; +my $output = qx{../src/task rc:425.rc 1 ls 2>&1}; like ($output, qr/1\s+Bar in Bar/m, 'parser - interpret \'in\' in description'); # Cleanup. diff --git a/test/bug.434.t b/test/bug.434.t index e523c7e9a..794701281 100755 --- a/test/bug.434.t +++ b/test/bug.434.t @@ -42,8 +42,8 @@ if (open my $fh, '>', 'bug.rc') # Bug #434: Task shouldn't prevent users from marking as done tasks with status:waiting # Add a task that is waiting -qx{../src/task rc:bug.rc add One wait:tomorrow}; -my $output = qx{../src/task rc:bug.rc 1 done}; +qx{../src/task rc:bug.rc add One wait:tomorrow 2>&1}; +my $output = qx{../src/task rc:bug.rc 1 done 2>&1}; like ($output, qr/Completed 1 task\./, 'Waiting task marked completed'); # Cleanup. diff --git a/test/bug.438.t b/test/bug.438.t index a8a95a7fe..85b11426d 100755 --- a/test/bug.438.t +++ b/test/bug.438.t @@ -46,39 +46,39 @@ if (open my $fh, '>', 'bug.rc') # time is included. # Ensure the two tasks have a 1 second delta in entry. -qx{../src/task rc:bug.rc add older}; +qx{../src/task rc:bug.rc add older 2>&1}; diag ("1 second delay"); sleep 1; -qx{../src/task rc:bug.rc add newer}; +qx{../src/task rc:bug.rc add newer 2>&1}; -my $output = qx{../src/task rc:bug.rc rc.report.foo.sort:entry+ foo}; +my $output = qx{../src/task rc:bug.rc rc.report.foo.sort:entry+ foo 2>&1}; like ($output, qr/older.+newer/ms, 'sort:entry+ -> older newer'); -$output = qx{../src/task rc:bug.rc rc.report.foo.sort:entry- foo}; +$output = qx{../src/task rc:bug.rc rc.report.foo.sort:entry- foo 2>&1}; like ($output, qr/newer.+older/ms, 'sort:entry- -> newer older'); # Ensure the two tasks have a 1 second delta in start. -qx{../src/task rc:bug.rc 1 start}; +qx{../src/task rc:bug.rc 1 start 2>&1}; diag ("1 second delay"); sleep 1; -qx{../src/task rc:bug.rc 2 start}; +qx{../src/task rc:bug.rc 2 start 2>&1}; -$output = qx{../src/task rc:bug.rc rc.report.foo.sort:start+ foo}; +$output = qx{../src/task rc:bug.rc rc.report.foo.sort:start+ foo 2>&1}; like ($output, qr/older.+newer/ms, 'sort:start+ -> older newer'); -$output = qx{../src/task rc:bug.rc rc.report.foo.sort:start- foo}; +$output = qx{../src/task rc:bug.rc rc.report.foo.sort:start- foo 2>&1}; like ($output, qr/newer.+older/ms, 'sort:start- -> newer older'); # Ensure the two tasks have a 1 second delta in end. -qx{../src/task rc:bug.rc 1 done}; +qx{../src/task rc:bug.rc 1 done 2>&1}; diag ("1 second delay"); sleep 1; -qx{../src/task rc:bug.rc 2 done}; +qx{../src/task rc:bug.rc 2 done 2>&1}; -$output = qx{../src/task rc:bug.rc rc.report.foo.sort:end+ foo}; +$output = qx{../src/task rc:bug.rc rc.report.foo.sort:end+ foo 2>&1}; like ($output, qr/older.+newer/ms, 'sort:end+ -> older newer'); -$output = qx{../src/task rc:bug.rc rc.report.foo.sort:end- foo}; +$output = qx{../src/task rc:bug.rc rc.report.foo.sort:end- foo 2>&1}; like ($output, qr/newer.+older/ms, 'sort:end- -> newer older'); # Cleanup. diff --git a/test/bug.440.t b/test/bug.440.t index d17fa76f5..4f9bdcbd1 100755 --- a/test/bug.440.t +++ b/test/bug.440.t @@ -44,14 +44,14 @@ if (open my $fh, '>', '440.rc') # Create a task and attempt simultaneous subst and appends, both permutations -qx{../src/task rc:440.rc add Foo}; -qx{../src/task rc:440.rc add Foo}; +qx{../src/task rc:440.rc add Foo 2>&1}; +qx{../src/task rc:440.rc add Foo 2>&1}; -qx{../src/task rc:440.rc 1 append /Foo/Bar/ Appendtext}; -qx{../src/task rc:440.rc 2 append Appendtext /Foo/Bar/}; +qx{../src/task rc:440.rc 1 append /Foo/Bar/ Appendtext 2>&1}; +qx{../src/task rc:440.rc 2 append Appendtext /Foo/Bar/ 2>&1}; -my $output1 = qx{../src/task rc:440.rc 1 ls}; -my $output2 = qx{../src/task rc:440.rc 2 ls}; +my $output1 = qx{../src/task rc:440.rc 1 ls 2>&1}; +my $output2 = qx{../src/task rc:440.rc 2 ls 2>&1}; unlike ($output1, qr/Foo/, 'simultaneous subst and append - subst'); like ($output1, qr/\w+ Appendtext/, 'simultaneous subst and append - append'); diff --git a/test/bug.441.t b/test/bug.441.t index c5189cfa1..11fd18102 100755 --- a/test/bug.441.t +++ b/test/bug.441.t @@ -41,9 +41,9 @@ if (open my $fh, '>', '441.rc') } # Bug #441: A colon messes up text replacement with /// -qx{../src/task rc:441.rc add one two three}; -qx{../src/task rc:441.rc 1 modify /two/two:/}; -my $output = qx{../src/task rc:441.rc ls}; +qx{../src/task rc:441.rc add one two three 2>&1}; +qx{../src/task rc:441.rc 1 modify /two/two:/ 2>&1}; +my $output = qx{../src/task rc:441.rc ls 2>&1}; like ($output, qr/one two: three/ms, 'Substitution with colon worked'); # Cleanup. diff --git a/test/bug.455.t b/test/bug.455.t index d16ca125b..2ae6539ea 100755 --- a/test/bug.455.t +++ b/test/bug.455.t @@ -41,10 +41,10 @@ if (open my $fh, '>', '455.rc') # Bug #455 - Text alignment in reports is broken when text contains utf8 characters -qx{../src/task rc:455.rc add abc pro:Bar\x{263A}}; -qx{../src/task rc:455.rc add def pro:Foo!}; +qx{../src/task rc:455.rc add abc pro:Bar\x{263A} 2>&1}; +qx{../src/task rc:455.rc add def pro:Foo! 2>&1}; -my $output = qx{../src/task rc:455.rc ls}; +my $output = qx{../src/task rc:455.rc ls 2>&1}; like ($output, qr/\s{7}abc/ms, 'bug 455 - correct spacing in utf8 task'); like ($output, qr/\s{7}def/ms, 'bug 455 - correct spacing in non utf8 task'); diff --git a/test/bug.480.t b/test/bug.480.t index 7a9b7e00c..c4bbe92b9 100755 --- a/test/bug.480.t +++ b/test/bug.480.t @@ -42,82 +42,82 @@ if (open my $fh, '>', 'bug.rc') } # Bug #480 - putting a '@' character in tags breaks filters. -qx{../src/task rc:bug.rc add one +ordinary}; -qx{../src/task rc:bug.rc add two +\@strange}; +qx{../src/task rc:bug.rc add one +ordinary 2>&1}; +qx{../src/task rc:bug.rc add two +\@strange 2>&1}; -my $output = qx{../src/task rc:bug.rc long +ordinary}; +my $output = qx{../src/task rc:bug.rc long +ordinary 2>&1}; like ($output, qr/one/, '+ordinary explicitly included'); # 2 unlike ($output, qr/two/, '@strange implicitly excluded'); -$output = qx{../src/task rc:bug.rc long -ordinary}; +$output = qx{../src/task rc:bug.rc long -ordinary 2>&1}; unlike ($output, qr/one/, '-ordinary explicitly excluded'); like ($output, qr/two/, '@strange implicitly included'); # 5 -$output = qx{../src/task rc:bug.rc long +\@strange}; +$output = qx{../src/task rc:bug.rc long +\@strange 2>&1}; unlike ($output, qr/one/, '-ordinary implicitly excluded'); like ($output, qr/two/, '@strange explicitly included'); # 7 -$output = qx{../src/task rc:bug.rc long -\@strange}; +$output = qx{../src/task rc:bug.rc long -\@strange 2>&1}; like ($output, qr/one/, '+ordinary implicitly included'); # 8 unlike ($output, qr/two/, '@strange explicitly excluded'); # Bug #XXX - '-t1 -t2' doesn't seem to work, when @ characters are involved. unlink 'pending.data'; -qx{../src/task rc:bug.rc add one +t1}; -qx{../src/task rc:bug.rc add two +t2}; -qx{../src/task rc:bug.rc add three +t3}; +qx{../src/task rc:bug.rc add one +t1 2>&1}; +qx{../src/task rc:bug.rc add two +t2 2>&1}; +qx{../src/task rc:bug.rc add three +t3 2>&1}; -$output = qx{../src/task rc:bug.rc list -t1}; +$output = qx{../src/task rc:bug.rc list -t1 2>&1}; unlike ($output, qr/one/, 'Single: no t1'); like ($output, qr/two/, 'Single: yes t2'); like ($output, qr/three/, 'Single: yes t3'); -$output = qx{../src/task rc:bug.rc list -t1 -t2}; +$output = qx{../src/task rc:bug.rc list -t1 -t2 2>&1}; unlike ($output, qr/one/, 'Double: no t1'); unlike ($output, qr/two/, 'Double: no t2'); like ($output, qr/three/, 'Double: yes t3'); -$output = qx{../src/task rc:bug.rc list -t1 -t2 -t3}; +$output = qx{../src/task rc:bug.rc list -t1 -t2 -t3 2>&1}; unlike ($output, qr/one/, 'Triple: no t1'); unlike ($output, qr/two/, 'Triple: no t2'); unlike ($output, qr/three/, 'Triple: no t3'); # Once again, with @ characters. -qx{../src/task rc:bug.rc 1 modify +\@1}; -qx{../src/task rc:bug.rc 2 modify +\@2}; -qx{../src/task rc:bug.rc 3 modify +\@3}; +qx{../src/task rc:bug.rc 1 modify +\@1 2>&1}; +qx{../src/task rc:bug.rc 2 modify +\@2 2>&1}; +qx{../src/task rc:bug.rc 3 modify +\@3 2>&1}; -$output = qx{../src/task rc:bug.rc list -\@1}; +$output = qx{../src/task rc:bug.rc list -\@1 2>&1}; unlike ($output, qr/one/, 'Single: no @1'); # 19 like ($output, qr/two/, 'Single: yes @2'); like ($output, qr/three/, 'Single: yes @3'); -$output = qx{../src/task rc:bug.rc list -\@1 -\@2}; +$output = qx{../src/task rc:bug.rc list -\@1 -\@2 2>&1}; unlike ($output, qr/one/, 'Double: no @1'); unlike ($output, qr/two/, 'Double: no @2'); like ($output, qr/three/, 'Double: yes @3'); -$output = qx{../src/task rc:bug.rc list -\@1 -\@2 -\@3}; +$output = qx{../src/task rc:bug.rc list -\@1 -\@2 -\@3 2>&1}; unlike ($output, qr/one/, 'Triple: no @1'); unlike ($output, qr/two/, 'Triple: no @2'); unlike ($output, qr/three/, 'Triple: no @3'); # Once again, with @ characters and punctuation. -qx{../src/task rc:bug.rc 1 modify +\@foo.1}; -qx{../src/task rc:bug.rc 2 modify +\@foo.2}; -qx{../src/task rc:bug.rc 3 modify +\@foo.3}; +qx{../src/task rc:bug.rc 1 modify +\@foo.1 2>&1}; +qx{../src/task rc:bug.rc 2 modify +\@foo.2 2>&1}; +qx{../src/task rc:bug.rc 3 modify +\@foo.3 2>&1}; -$output = qx{../src/task rc:bug.rc list -\@foo.1}; +$output = qx{../src/task rc:bug.rc list -\@foo.1 2>&1}; unlike ($output, qr/one/, 'Single: no @foo.1'); like ($output, qr/two/, 'Single: yes @foo.2'); like ($output, qr/three/, 'Single: yes @foo.3'); -$output = qx{../src/task rc:bug.rc list -\@foo.1 -\@foo.2}; +$output = qx{../src/task rc:bug.rc list -\@foo.1 -\@foo.2 2>&1}; unlike ($output, qr/one/, 'Double: no @foo.1'); unlike ($output, qr/two/, 'Double: no @foo.2'); like ($output, qr/three/, 'Double: yes @foo.3'); -$output = qx{../src/task rc:bug.rc list -\@foo.1 -\@foo.2 -\@foo.3}; +$output = qx{../src/task rc:bug.rc list -\@foo.1 -\@foo.2 -\@foo.3 2>&1}; unlike ($output, qr/one/, 'Triple: no @foo.1'); unlike ($output, qr/two/, 'Triple: no @foo.2'); unlike ($output, qr/three/, 'Triple: no @foo.3'); diff --git a/test/bug.489.t b/test/bug.489.t index b94f757c9..84ead8add 100755 --- a/test/bug.489.t +++ b/test/bug.489.t @@ -40,9 +40,9 @@ if (open my $fh, '>', 'bug.rc') } # Bug #489 - tags.none: is not filtering tagless tasks -qx{../src/task rc:bug.rc add with +tag}; -qx{../src/task rc:bug.rc add without}; -my $output = qx{../src/task rc:bug.rc list tags.none:}; +qx{../src/task rc:bug.rc add with +tag 2>&1}; +qx{../src/task rc:bug.rc add without 2>&1}; +my $output = qx{../src/task rc:bug.rc list tags.none: 2>&1}; unlike ($output, qr/with /, 'tags.none: skips tagged'); like ($output, qr/without/, 'tags.none: finds tagless'); diff --git a/test/bug.495.t b/test/bug.495.t index 917d8abc8..a68f4a11c 100755 --- a/test/bug.495.t +++ b/test/bug.495.t @@ -41,9 +41,9 @@ if (open my $fh, '>', 'bug.rc') } # Bug #495 - double hyphen mishandled for annotations. -qx{../src/task rc:bug.rc add foo}; -qx{../src/task rc:bug.rc 1 annotate "This -- is -- a -- test"}; -my $output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc add foo 2>&1}; +qx{../src/task rc:bug.rc 1 annotate "This -- is -- a -- test" 2>&1}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/This is -- a -- test/, 'Double hyphens preserved, except the first ones.'); # Cleanup. diff --git a/test/bug.555.t b/test/bug.555.t index e61cb013b..ebdfe52f9 100755 --- a/test/bug.555.t +++ b/test/bug.555.t @@ -40,7 +40,7 @@ if (open my $fh, '>', 'bug.rc') } # Bug #555 - log with a project segfaults. -my $output = qx{../src/task rc:bug.rc log description project:p}; +my $output = qx{../src/task rc:bug.rc log description project:p 2>&1}; unlike ($output, qr/Segmentation fault/, 'no segfault from log with project'); # Cleanup. diff --git a/test/bug.580.t b/test/bug.580.t index fcade91cd..2e0286aa7 100755 --- a/test/bug.580.t +++ b/test/bug.580.t @@ -61,15 +61,15 @@ if (open my $fh, '>', 'remote.rc') } # add a remote task -qx{../src/task rc:remote.rc add remote task}; +qx{../src/task rc:remote.rc add remote task 2>&1}; # add a local task -qx(../src/task rc:local.rc add local task); +qx{../src/task rc:local.rc add local task 2>&1}; # merge and autopush -qx{../src/task rc:local.rc merge}; +qx{../src/task rc:local.rc merge 2>&1}; -my $output = qx{../src/task rc:remote.rc ls}; +my $output = qx{../src/task rc:remote.rc ls 2>&1}; like ($output, qr/local task/, "autopush failed"); # Cleanup. diff --git a/test/bug.605.t b/test/bug.605.t index fb15d1da1..af0e8e61c 100755 --- a/test/bug.605.t +++ b/test/bug.605.t @@ -42,14 +42,14 @@ if (open my $fh, '>', 'bug.rc') # Bug #605 - project count zero bug? # Setup: Add a task and complete it -qx{../src/task rc:bug.rc add One project:p1}; +qx{../src/task rc:bug.rc add One project:p1 2>&1}; # Delete the task and note the completion status of the project. my $output = qx{echo 'y' | ../src/task rc:bug.rc 1 delete 2>&1 >/dev/null}; like ($output, qr/is 0\% complete/ms, 'Empty project correctly reported as being 0% completed.'); # Add another task, complete it and note the completion status of hte project. -qx{../src/task rc:bug.rc add Two project:p1}; +qx{../src/task rc:bug.rc add Two project:p1 2>&1}; $output = qx{../src/task rc:bug.rc 2 done 2>&1 >/dev/null}; like ($output, qr/is 100\% complete/ms, 'Empty project correctly reported as being 100% completed.'); diff --git a/test/bug.628.t b/test/bug.628.t index 349f40fd1..517c2b650 100755 --- a/test/bug.628.t +++ b/test/bug.628.t @@ -43,10 +43,10 @@ if (open my $fh, '>', 'bug.rc') # Bug 628: task wait: with non-standard dateformat bug # Setup: Add a task -qx{../src/task rc:bug.rc add wait:\\"Wed Jan 01 2020\\" A buggy task}; +qx{../src/task rc:bug.rc add wait:\\"Wed Jan 01 2020\\" A buggy task 2>&1}; # Result: Immediately delete the created task -my $output = qx{../src/task rc:bug.rc waiting}; +my $output = qx{../src/task rc:bug.rc waiting 2>&1}; like ($output, qr/1\/1\/2020/ms, 'a b D Y dateformat correctly parsed.'); # Cleanup. diff --git a/test/bug.634.t b/test/bug.634.t index 9cba96160..6422bf76e 100755 --- a/test/bug.634.t +++ b/test/bug.634.t @@ -42,10 +42,10 @@ if (open my $fh, '>', 'bug.rc') # Bug 634: confirmation=off not honored by undo # Setup: Add a task -qx{../src/task rc:bug.rc add Test}; +qx{../src/task rc:bug.rc add Test 2>&1}; # Result: Attempt to undo add with confirmation=off -my $output = qx{echo 'n' |../src/task rc:bug.rc rc.confirmation=off undo}; +my $output = qx{echo 'n' |../src/task rc:bug.rc rc.confirmation=off undo 2>&1}; unlike ($output, qr/Are you sure/ms, 'Undo honours confirmation=off.'); # Cleanup. diff --git a/test/bug.635.t b/test/bug.635.t index e4305a2de..ccf07d9ec 100755 --- a/test/bug.635.t +++ b/test/bug.635.t @@ -42,13 +42,13 @@ if (open my $fh, '>', 'bug.rc') # Bug 635: /OLD/NEW/g is broken? # Setup: Add a task with two identical spelling mistakes -qx{../src/task rc:bug.rc add Pay teh rent on teh 31st}; +qx{../src/task rc:bug.rc add Pay teh rent on teh 31st 2>&1}; # Process: Global replace incorrect text -qx{../src/task rc:bug.rc 1 modify /teh/the/g}; +qx{../src/task rc:bug.rc 1 modify /teh/the/g 2>&1}; # Result: Verify corrected output -my $output = qx{../src/task rc:bug.rc ls 1}; +my $output = qx{../src/task rc:bug.rc ls 1 2>&1}; like ($output, qr/Pay the rent on the 31st/ms, 'Global replace performed correctly.'); # Cleanup. diff --git a/test/bug.649.t b/test/bug.649.t index 3abd2693d..ab9a1ac1d 100755 --- a/test/bug.649.t +++ b/test/bug.649.t @@ -43,10 +43,10 @@ if (open my $fh, '>', 'bug.rc') # marked completed # Setup: Add a recurring task -qx{../src/task rc:bug.rc add Test due:3d rec:1w}; +qx{../src/task rc:bug.rc add Test due:3d rec:1w 2>&1}; # Result: Immediately delete the created task -my $output = qx{../src/task rc:bug.rc 1 done}; +my $output = qx{../src/task rc:bug.rc 1 done 2>&1}; like ($output, qr/is neither pending nor waiting/, 'Parent task not completable'); unlike ($output, qr/Completed 1/ms, 'New recurring task cannot be immediately completed.'); diff --git a/test/bug.656.t b/test/bug.656.t index 4a12aa5c1..41f20442e 100755 --- a/test/bug.656.t +++ b/test/bug.656.t @@ -42,17 +42,17 @@ if (open my $fh, '>', 'bug.rc') # Bug 656: Recurring task continually spawns new tasks # Setup: Add a pair of recurring tasks -qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily}; -qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily}; +qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily 2>&1}; +qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily 2>&1}; # Bug describes that each time task is executed, another child task of the # Second recurring task is created. -qx{../src/task rc:bug.rc ls}; +qx{../src/task rc:bug.rc ls 2>&1}; # Result: Check for an extra task the second time task ls is executed -my $output = qx{../src/task rc:bug.rc ls}; +my $output = qx{../src/task rc:bug.rc ls 2>&1}; unlike ($output, qr/^\s3\s*Second recurring task\s*$/ms, 'Extra task detected.'); # Cleanup. diff --git a/test/bug.668.t b/test/bug.668.t index 44b18aeb9..b10e27116 100755 --- a/test/bug.668.t +++ b/test/bug.668.t @@ -40,11 +40,11 @@ if (open my $fh, '>', 'bug.rc') # Bug 668: URL should allow users with dot character -my $output = qx{../src/task rc:bug.rc merge user.name\@taskwarrior.org:undo.data}; +my $output = qx{../src/task rc:bug.rc merge user.name\@taskwarrior.org:undo.data 2>&1}; unlike ($output, qr/not a valid modifier/, 'scp syntax with dots'); unlike ($output, qr/not in the expected format/, 'scp syntax with dots'); -$output = qx{../src/task rc:bug.rc merge ssh://user.name\@taskwarrior.org/undo.data}; +$output = qx{../src/task rc:bug.rc merge ssh://user.name\@taskwarrior.org/undo.data 2>&1}; unlike ($output, qr/not a valid modifier/, 'standard syntax with dots'); unlike ($output, qr/not in the expected format/, 'standard syntax with dots'); diff --git a/test/bug.674.t b/test/bug.674.t index 7ce734c4b..ef23459d6 100755 --- a/test/bug.674.t +++ b/test/bug.674.t @@ -41,15 +41,15 @@ if (open my $fh, '>', 'bug.rc') # Bug 674: ID numbers change between reports when marking tasks as done # Setup: Add a few tasks -qx{../src/task rc:bug.rc add One}; -qx{../src/task rc:bug.rc add Two}; -qx{../src/task rc:bug.rc add Three}; +qx{../src/task rc:bug.rc add One 2>&1}; +qx{../src/task rc:bug.rc add Two 2>&1}; +qx{../src/task rc:bug.rc add Three 2>&1}; # Complete task 1 and then attempt to complete task 2 -qx{../src/task rc:bug.rc 1 done}; +qx{../src/task rc:bug.rc 1 done 2>&1}; # Result: Immediately delete the created task -my $output = qx{../src/task rc:bug.rc 2 done}; +my $output = qx{../src/task rc:bug.rc 2 done 2>&1}; like ($output, qr/Two/ms, 'IDs correctly remain unchanged after done'); # Cleanup. diff --git a/test/bug.694.t b/test/bug.694.t index 220022e74..8fd61c219 100755 --- a/test/bug.694.t +++ b/test/bug.694.t @@ -41,11 +41,11 @@ if (open my $fh, '>', 'bug.rc') # Bug 694: Potential bug for "due" and "annotate" # Setup: Add a tasks, annotate with long word. -qx{../src/task rc:bug.rc add One}; -qx{../src/task rc:bug.rc 1 annotate foo due:today}; +qx{../src/task rc:bug.rc add One 2>&1}; +qx{../src/task rc:bug.rc 1 annotate foo due:today 2>&1}; # List with rc.hyphenate=on. -my $output = qx{../src/task rc:bug.rc 1 info}; +my $output = qx{../src/task rc:bug.rc 1 info 2>&1}; like ($output, qr/One/, 'found One'); like ($output, qr/foo/, 'found foo'); like ($output, qr/Due/, 'found Due'); diff --git a/test/bug.703.t b/test/bug.703.t index 270c7385d..b7ea2856d 100755 --- a/test/bug.703.t +++ b/test/bug.703.t @@ -42,19 +42,19 @@ if (open my $fh, '>', 'bug.rc') # Bug 703: /from/t/g fails to make all changes to annotations # Setup: Add a few tasks -qx{../src/task rc:bug.rc add This is a test}; -qx{../src/task rc:bug.rc 1 annotate Annotation one}; -qx{../src/task rc:bug.rc 1 annotate Annotation two}; -qx{../src/task rc:bug.rc 1 annotate Annotation three}; +qx{../src/task rc:bug.rc add This is a test 2>&1}; +qx{../src/task rc:bug.rc 1 annotate Annotation one 2>&1}; +qx{../src/task rc:bug.rc 1 annotate Annotation two 2>&1}; +qx{../src/task rc:bug.rc 1 annotate Annotation three 2>&1}; -my $output = qx{../src/task rc:bug.rc list}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/This is a test/, 'original description'); like ($output, qr/Annotation one/, 'original annotation one'); like ($output, qr/Annotation two/, 'original annotation two'); like ($output, qr/Annotation three/, 'original annotation three'); -qx{../src/task rc:bug.rc 1 modify /i/I/g}; -$output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc 1 modify /i/I/g 2>&1}; +$output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/ThIs Is a test/, 'new description'); like ($output, qr/AnnotatIon one/, 'new annotation one'); like ($output, qr/AnnotatIon two/, 'new annotation two'); diff --git a/test/bug.708.t b/test/bug.708.t index 4e4ed9dae..ebcad4855 100755 --- a/test/bug.708.t +++ b/test/bug.708.t @@ -43,16 +43,16 @@ if (open my $fh, '>', 'bug.rc') # Bug 708: Bad Math in Project is % Complete # Setup: Add a few tasks -qx{../src/task rc:bug.rc add One pro:p1}; -qx{../src/task rc:bug.rc add Two pro:p1}; -qx{../src/task rc:bug.rc add Three pro:p1}; -qx{../src/task rc:bug.rc add Four pro:p1}; -qx{../src/task rc:bug.rc add Five pro:p1}; -qx{../src/task rc:bug.rc add Six pro:p1}; -qx{../src/task rc:bug.rc add Seven pro:p1}; -qx{../src/task rc:bug.rc add Eight pro:p1}; -qx{../src/task rc:bug.rc add Nine pro:p1}; -qx{../src/task rc:bug.rc add Ten pro:p1}; +qx{../src/task rc:bug.rc add One pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Two pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Three pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Four pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Five pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Six pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Seven pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Eight pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Nine pro:p1 2>&1}; +qx{../src/task rc:bug.rc add Ten pro:p1 2>&1}; # Complete three tasks and ensure pending and done counts are updated correctly. my $output = qx{../src/task rc:bug.rc 1-3 do 2>&1 >/dev/null}; diff --git a/test/bug.804.t b/test/bug.804.t index 17b478378..bf9a51c5a 100755 --- a/test/bug.804.t +++ b/test/bug.804.t @@ -43,16 +43,16 @@ if (open my $fh, '>', 'bug.rc') # Bug 804: URL link and break line # Setup: Add a tasks, annotate with long word. -qx{../src/task rc:bug.rc add One}; -qx{../src/task rc:bug.rc 1 annotate abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz}; +qx{../src/task rc:bug.rc add One 2>&1}; +qx{../src/task rc:bug.rc 1 annotate abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz 2>&1}; # List with rc.hyphenate=on. -my $output = qx{../src/task rc:bug.rc rc.defaultwidth:40 rc.hyphenate:on ls}; +my $output = qx{../src/task rc:bug.rc rc.defaultwidth:40 rc.hyphenate:on ls 2>&1}; like ($output, qr/vwx-\n/ms, 'hyphenated 1'); like ($output, qr/tuv-\n/ms, 'hyphenated 2'); # List with rc.hyphenate=off. -$output = qx{../src/task rc:bug.rc rc.defaultwidth:40 rc.hyphenate:off ls}; +$output = qx{../src/task rc:bug.rc rc.defaultwidth:40 rc.hyphenate:off ls 2>&1}; like ($output, qr/vwxy\n/ms, 'not hyphenated 1'); like ($output, qr/uvwx\n/ms, 'not hyphenated 2'); diff --git a/test/bug.818.t b/test/bug.818.t index c249b349d..99c778150 100755 --- a/test/bug.818.t +++ b/test/bug.818.t @@ -40,27 +40,27 @@ if (open my $fh, '>', 'bug.rc') # Bug #818: Filtering by tag counter-intuitively uses partial match -qx{../src/task rc:bug.rc add +hannah +anna Buy some bananas}; -my $output = qx{../src/task rc:bug.rc list +hannah}; +qx{../src/task rc:bug.rc add +hannah +anna Buy some bananas 2>&1}; +my $output = qx{../src/task rc:bug.rc list +hannah 2>&1}; like ($output, qr/bananas/, 'Containing tag query'); -$output = qx{../src/task rc:bug.rc list +anna}; +$output = qx{../src/task rc:bug.rc list +anna 2>&1}; like ($output, qr/bananas/, 'Contained tag query'); -qx{../src/task rc:bug.rc add +anna +hannah Buy tickets to Santana}; -$output = qx{../src/task rc:bug.rc list +anna}; +qx{../src/task rc:bug.rc add +anna +hannah Buy tickets to Santana 2>&1}; +$output = qx{../src/task rc:bug.rc list +anna 2>&1}; like ($output, qr/Santana/, 'Contained tag query'); -$output = qx{../src/task rc:bug.rc list +hannah}; +$output = qx{../src/task rc:bug.rc list +hannah 2>&1}; like ($output, qr/Santana/, 'Containing tag query'); # Buy some bananas +hannah +anna # Buy tickets to Santana +anna +hannah # AAA +hannah # BBB +anna -qx{../src/task rc:bug.rc add +hannah AAA}; -qx{../src/task rc:bug.rc add +anna BBB}; -$output = qx{../src/task rc:bug.rc long +anna}; +qx{../src/task rc:bug.rc add +hannah AAA 2>&1}; +qx{../src/task rc:bug.rc add +anna BBB 2>&1}; +$output = qx{../src/task rc:bug.rc long +anna 2>&1}; like ($output, qr/bananas/, '+anna --> bananas'); like ($output, qr/Santana/, '+anna --> Santana'); unlike ($output, qr/AAA/, '+anna !-> AAA'); diff --git a/test/bug.819.t b/test/bug.819.t index 3cfa2a455..a20ffc36d 100755 --- a/test/bug.819.t +++ b/test/bug.819.t @@ -39,10 +39,10 @@ if (open my $fh, '>', 'bug.rc') } # Bug 819: When I run "task add foo\'s bar." the description of the new task is "foo 's bar .". -qx{../src/task rc:bug.rc add foo\\'s bar.}; -qx{../src/task rc:bug.rc add foo \\(bar\\)}; -qx{../src/task rc:bug.rc add \\'baz \\(qux\\)\\'}; -my $output = qx{../src/task rc:bug.rc ls}; +qx{../src/task rc:bug.rc add foo\\'s bar. 2>&1}; +qx{../src/task rc:bug.rc add foo \\(bar\\) 2>&1}; +qx{../src/task rc:bug.rc add \\'baz \\(qux\\)\\' 2>&1}; +my $output = qx{../src/task rc:bug.rc ls 2>&1}; like ($output, qr/foo's bar\./, "foo's bar. --> preserved"); #like ($output, qr/foo \(bar\)/, "foo \(bar\) -- preserved"); diff --git a/test/bug.835.t b/test/bug.835.t index e23a8119d..8133442c9 100755 --- a/test/bug.835.t +++ b/test/bug.835.t @@ -38,11 +38,11 @@ if (open my $fh, '>', 'bug.rc') ok (-r 'bug.rc', 'Created bug.rc'); } -qx{../src/task rc:bug.rc add pro:main.subproject Test}; -my $output = qx{../src/task rc:bug.rc ls}; +qx{../src/task rc:bug.rc add pro:main.subproject Test 2>&1}; +my $output = qx{../src/task rc:bug.rc ls 2>&1}; like ($output, qr/main\.subproject/, "hierarchical project ok"); -qx{../src/task rc:bug.rc \\(pro:main.subproject\\) ls}; +qx{../src/task rc:bug.rc \\(pro:main.subproject\\) ls 2>&1}; like ($output, qr/main\.subproject/, "Parens tolerated"); unlike ($output, qr/Mismatched parentheses in expression/, "No 'mismatch' error generated"); diff --git a/test/bug.837.t b/test/bug.837.t index d71b373d7..a67f0eb18 100755 --- a/test/bug.837.t +++ b/test/bug.837.t @@ -40,20 +40,20 @@ if (open my $fh, '>', 'bug.rc') # Bug 837: When a task is completed, tasks that depended upon it don't have # correct urgency and depend on 0 when edited -qx{../src/task rc:bug.rc add one}; -qx{../src/task rc:bug.rc add two dep:1}; -my $output = qx{../src/task rc:bug.rc long}; +qx{../src/task rc:bug.rc add one 2>&1}; +qx{../src/task rc:bug.rc add two dep:1 2>&1}; +my $output = qx{../src/task rc:bug.rc long 2>&1}; -$output = qx{../src/task rc:bug.rc 1 _urgency}; +$output = qx{../src/task rc:bug.rc 1 _urgency 2>&1}; like ($output, qr/ 8\n/, 'blocking urgency == 8'); -$output = qx{../src/task rc:bug.rc 2 _urgency}; +$output = qx{../src/task rc:bug.rc 2 _urgency 2>&1}; like ($output, qr/ -5\n/, 'blocked urgency == -5'); -qx{../src/task rc:bug.rc 1 done}; -qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc 1 done 2>&1}; +qx{../src/task rc:bug.rc list 2>&1}; -$output = qx{../src/task rc:bug.rc 1 _urgency}; +$output = qx{../src/task rc:bug.rc 1 _urgency 2>&1}; like ($output, qr/ 0\n/, 'unblocked urgency == 0'); # Cleanup. diff --git a/test/bug.839.t b/test/bug.839.t index fd9991c1a..f1c44facd 100755 --- a/test/bug.839.t +++ b/test/bug.839.t @@ -45,7 +45,7 @@ if (open my $fh, '>', 'pending.data') ok (-r 'pending.data', 'Created pending.data'); } -my $output = qx{../src/task rc:bug.rc list}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/One/, 'task listed'); unlike ($output, qr/The recurrence value '1m' is not valid\./, 'recu:1m => no error'); diff --git a/test/bug.851.t b/test/bug.851.t index 7bec6a37e..05eb231b0 100755 --- a/test/bug.851.t +++ b/test/bug.851.t @@ -39,17 +39,17 @@ if (open my $fh, '>', 'bug.rc') } # Bug 851: Filtering by due dates with ordinal and d/wks/etc. doesn't work -qx{../src/task rc:bug.rc add yesterday due:-2days}; -qx{../src/task rc:bug.rc add tomorrow due:2days}; -my $output = qx{../src/task rc:bug.rc ls}; +qx{../src/task rc:bug.rc add yesterday due:-2days 2>&1}; +qx{../src/task rc:bug.rc add tomorrow due:2days 2>&1}; +my $output = qx{../src/task rc:bug.rc ls 2>&1}; like ($output, qr/yesterday/, "yesterday - task added"); like ($output, qr/tomorrow/, "tomorrow - task added"); -$output = qx{../src/task rc:bug.rc list due.before:1d}; +$output = qx{../src/task rc:bug.rc list due.before:1d 2>&1}; like ($output, qr/yesterday/, "yesterday - found before:1d"); unlike ($output, qr/tomorrow/, "tomorrow - not found before:1d"); -$output = qx{../src/task rc:bug.rc list due.after:1d}; +$output = qx{../src/task rc:bug.rc list due.after:1d 2>&1}; unlike ($output, qr/yesterday/, "yesterday - not found after:1d"); like ($output, qr/tomorrow/, "tomorrow - found after:1d"); diff --git a/test/bug.856.t b/test/bug.856.t index 04c17b2ec..9123e8c90 100755 --- a/test/bug.856.t +++ b/test/bug.856.t @@ -41,18 +41,18 @@ if (open my $fh, '>', 'bug.rc') # Bug 856: "task list project.none:" does not work. # Note: Not using "assigned" and "unassigned" because one is a subset of the # other. -qx{../src/task rc:bug.rc add assigned project:X}; -qx{../src/task rc:bug.rc add floating}; +qx{../src/task rc:bug.rc add assigned project:X 2>&1}; +qx{../src/task rc:bug.rc add floating 2>&1}; -my $output = qx{../src/task rc:bug.rc ls project:}; +my $output = qx{../src/task rc:bug.rc ls project: 2>&1}; like ($output, qr/floating/, 'project: matches floating'); unlike ($output, qr/assigned/, 'project: does not match assigned'); -$output = qx{../src/task rc:bug.rc ls project:''}; +$output = qx{../src/task rc:bug.rc ls project:'' 2>&1}; like ($output, qr/floating/, 'project:\'\' matches floating'); unlike ($output, qr/assigned/, 'project:\'\' does not match assigned'); -$output = qx{../src/task rc:bug.rc ls project.none:}; +$output = qx{../src/task rc:bug.rc ls project.none: 2>&1}; like ($output, qr/floating/, 'project.none: matches floating'); unlike ($output, qr/assigned/, 'project.none: does not match assigned'); diff --git a/test/bug.860.t b/test/bug.860.t index 304e1ba33..ca19afb86 100755 --- a/test/bug.860.t +++ b/test/bug.860.t @@ -39,8 +39,8 @@ if (open my $fh, '>', 'bug.rc') } # Bug 869: lower case priorities aren't accepted. -qx{../src/task rc:bug.rc add foo pri:h}; -my $output = qx{../src/task rc:bug.rc 1 info}; +qx{../src/task rc:bug.rc add foo pri:h 2>&1}; +my $output = qx{../src/task rc:bug.rc 1 info 2>&1}; like ($output, qr/Priority\s+H/, "pri:h --> pri:H"); # Cleanup. diff --git a/test/bug.879.t b/test/bug.879.t index 2385389a4..1580aa76b 100755 --- a/test/bug.879.t +++ b/test/bug.879.t @@ -39,17 +39,17 @@ if (open my $fh, '>', 'bug.rc') } # Bug 879: Backslash at end of description/annotation causes problems. -qx{../src/task rc:bug.rc add one\\\\}; -my $output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc add one\\\\ 2>&1}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/one\\/, 'Backslash preserved in description'); -qx{../src/task rc:bug.rc 1 annotate foo\\\\}; -$output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc 1 annotate foo\\\\ 2>&1}; +$output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/one\\/, 'Backslash preserved in description'); like ($output, qr/foo\\/, 'Backslash preserved in annotation 1'); -qx{../src/task rc:bug.rc 1 annotate bar\\\\}; -$output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc 1 annotate bar\\\\ 2>&1}; +$output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/one\\/, 'Backslash preserved in description'); like ($output, qr/foo\\/, 'Backslash preserved in annotation 1'); like ($output, qr/bar\\/, 'Backslash preserved in annotation 2'); diff --git a/test/bug.884.t b/test/bug.884.t index b0d38cdff..72c309212 100755 --- a/test/bug.884.t +++ b/test/bug.884.t @@ -39,9 +39,9 @@ if (open my $fh, '>', 'bug.rc') } # Bug 884: Extra space in path name. -qx{../src/task rc:bug.rc add /one/two/three/}; -qx{../src/task rc:bug.rc add \\'/four/five/six/\\'}; -my $output = qx{../src/task rc:bug.rc ls}; +qx{../src/task rc:bug.rc add /one/two/three/ 2>&1}; +qx{../src/task rc:bug.rc add \\'/four/five/six/\\' 2>&1}; +my $output = qx{../src/task rc:bug.rc ls 2>&1}; #like ($output, qr/\/one\/two\/three\//, "/one/two/three/ --> preserved"); pass ("/one/two/three/ --> preserved -- TEST SKIPPED --"); diff --git a/test/bug.886.t b/test/bug.886.t index cb57c417a..3463ba622 100755 --- a/test/bug.886.t +++ b/test/bug.886.t @@ -39,7 +39,7 @@ if (open my $fh, '>', 'bug.rc') } # Bug 886: tw doesn't warn the user if, e.g., a weekday cannot be resolved properly -my $output = qx{../src/task rc:bug.rc add one due:sund}; +my $output = qx{../src/task rc:bug.rc add one due:sund 2>&1}; like ($output, qr/Created task 1\./, 'sund --> valid date'); $output = qx{../src/task rc:bug.rc add two due:donkey 2>&1 >/dev/null}; diff --git a/test/bug.906.t b/test/bug.906.t index 7e6d1d031..17e707c69 100755 --- a/test/bug.906.t +++ b/test/bug.906.t @@ -40,30 +40,30 @@ if (open my $fh, '>', 'bug.rc') } # Bug 906: escaping runs amok -qx{../src/task rc:bug.rc add zero}; -qx{../src/task rc:bug.rc add one pro:a.b}; -qx{../src/task rc:bug.rc add two pro:a}; -my $output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc add zero 2>&1}; +qx{../src/task rc:bug.rc add one pro:a.b 2>&1}; +qx{../src/task rc:bug.rc add two pro:a 2>&1}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/zero/, 'list - zero included'); like ($output, qr/one/, 'list - one included'); like ($output, qr/two/, 'list - two included'); -$output = qx{../src/task rc:bug.rc list pro:a}; +$output = qx{../src/task rc:bug.rc list pro:a 2>&1}; unlike ($output, qr/zero/, 'list - zero excluded'); like ($output, qr/one/, 'list - one included'); like ($output, qr/two/, 'list - two included'); -$output = qx{../src/task rc:bug.rc list pro:a.b}; +$output = qx{../src/task rc:bug.rc list pro:a.b 2>&1}; unlike ($output, qr/zero/, 'list - zero included'); like ($output, qr/one/, 'list - one excluded'); unlike ($output, qr/two/, 'list - two included'); -$output = qx{../src/task rc:bug.rc list pro.not:a}; +$output = qx{../src/task rc:bug.rc list pro.not:a 2>&1}; like ($output, qr/zero/, 'list - zero included'); unlike ($output, qr/one/, 'list - one excluded'); unlike ($output, qr/two/, 'list - two excluded'); -$output = qx{../src/task rc:bug.rc list pro.not:a.b}; +$output = qx{../src/task rc:bug.rc list pro.not:a.b 2>&1}; like ($output, qr/zero/, 'list - zero included'); unlike ($output, qr/one/, 'list - one excluded'); like ($output, qr/two/, 'list - two included'); diff --git a/test/bug.917.t b/test/bug.917.t index 60d1ec234..11e5969d1 100755 --- a/test/bug.917.t +++ b/test/bug.917.t @@ -40,14 +40,14 @@ if (open my $fh, '>', 'bug.rc') } # Bug 917: escaping runs amok -qx{../src/task rc:bug.rc add one \\'two\\' three}; -qx{../src/task rc:bug.rc add four \\"five\\" six}; -my $output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc add one \\'two\\' three 2>&1}; +qx{../src/task rc:bug.rc add four \\"five\\" six 2>&1}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/one 'two' three/, 'Single quote preserved'); like ($output, qr/four "five" six/, 'Double quote preserved'); -qx{../src/task rc:bug.rc 1,2 mod +tag}; -$output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc 1,2 mod +tag 2>&1}; +$output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/one 'two' three/, 'Single quote preserved after modification'); like ($output, qr/four "five" six/, 'Double quote preserved after modification'); diff --git a/test/bug.924.t b/test/bug.924.t index b253deec7..d6e1ab96b 100755 --- a/test/bug.924.t +++ b/test/bug.924.t @@ -39,10 +39,10 @@ if (open my $fh, '>', 'bug.rc') } # Bug 924: '1.0' --> '1.0000' -qx{../src/task rc:bug.rc add release 1.0}; -qx{../src/task rc:bug.rc add 'release 2.0'}; -qx{../src/task rc:bug.rc add "release 3.0"}; -my $output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc add release 1.0 2>&1}; +qx{../src/task rc:bug.rc add 'release 2.0' 2>&1}; +qx{../src/task rc:bug.rc add "release 3.0" 2>&1}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/\s1.0\n/ms, 'Plain text floating point preserved'); like ($output, qr/\s2.0\n/ms, 'Single quote floating point preserved'); like ($output, qr/\s3.0\n/ms, 'Double quote floating point preserved'); diff --git a/test/bug.932.t b/test/bug.932.t index 4a493bbe1..82da5ad0c 100755 --- a/test/bug.932.t +++ b/test/bug.932.t @@ -43,25 +43,25 @@ if (open my $fh, '>', 'bug.rc') # - add a recurring task with multiple child tasks # - modify a child task and test for propagation # - modify the parent task and test for propagation -qx{../src/task rc:bug.rc add R due:yesterday recur:daily}; -my $output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc add R due:yesterday recur:daily 2>&1}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/2.+R/ms, 'Found child 0'); like ($output, qr/3.+R/ms, 'Found child 1'); like ($output, qr/4.+R/ms, 'Found child 2'); -qx{echo 'y' | ../src/task rc:bug.rc 2 mod project:P}; -$output = qx{../src/task rc:bug.rc list}; +qx{echo 'y' | ../src/task rc:bug.rc 2 mod project:P 2>&1}; +$output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/2\s+P.+R/ms, 'Found modified child 0'); like ($output, qr/3\s+P.+R/ms, 'Found modified child 1 (propagated from 0)'); like ($output, qr/4\s+P.+R/ms, 'Found modified child 2 (propagated from 0)'); -qx{echo 'y' | ../src/task rc:bug.rc 1 mod priority:H}; -$output = qx{../src/task rc:bug.rc list}; +qx{echo 'y' | ../src/task rc:bug.rc 1 mod priority:H 2>&1}; +$output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/2\s+P.+H.+R/ms, 'Found modified child 0 (propagated from parent'); like ($output, qr/3\s+P.+H.+R/ms, 'Found modified child 1 (propagated from parent)'); like ($output, qr/4\s+P.+H.+R/ms, 'Found modified child 2 (propagated from parent)'); -$output = qx{../src/task rc:bug.rc diag}; +$output = qx{../src/task rc:bug.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/bug.954.t b/test/bug.954.t index a7ec553d4..6ac1855ef 100755 --- a/test/bug.954.t +++ b/test/bug.954.t @@ -44,14 +44,14 @@ if (open my $fh, '>', 'bug.rc') # - deleting task with UUID 874e146d-07a2-2d2c-7808-a76e74b1a332 # - searching for tasks "foo" and "bar" -qx{../src/task rc:bug.rc add foo}; -qx{../src/task rc:bug.rc add bar}; -my $output = qx{../src/task rc:bug.rc list}; +qx{../src/task rc:bug.rc add foo 2>&1}; +qx{../src/task rc:bug.rc add bar 2>&1}; +my $output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/foo/ms, 'Task foo added'); like ($output, qr/bar/ms, 'Task bar added'); -qx{../src/task rc:bug.rc rc.confirmation=off rc.verbose=nothing rc.bulk=1000 874e146d-07a2-2d2c-7808-a76e74b1a332 delete}; +qx{../src/task rc:bug.rc rc.confirmation=off rc.verbose=nothing rc.bulk=1000 874e146d-07a2-2d2c-7808-a76e74b1a332 delete 2>&1}; -$output = qx{../src/task rc:bug.rc list}; +$output = qx{../src/task rc:bug.rc list 2>&1}; like ($output, qr/foo/ms, 'Task foo not deleted'); like ($output, qr/bar/ms, 'Task bar not deleted'); diff --git a/test/bug.956.t b/test/bug.956.t index 26fe89648..813c510e2 100755 --- a/test/bug.956.t +++ b/test/bug.956.t @@ -41,7 +41,7 @@ if (open my $fh, '>', 'bug.rc') # Bug 956 - 'task ids' prints the header, which prevents using the command in # external script (it applies also for 'uuids' and helper subcommands). -qx{../src/task rc:bug.rc add test}; +qx{../src/task rc:bug.rc add test 2>&1}; my $output = qx{TASKRC=bug.rc ../src/task rc:bug.rc ids}; unlike ($output, qr/TASKRC/ms, 'The header does not appear with "ids"'); @@ -49,7 +49,7 @@ unlike ($output, qr/TASKRC/ms, 'The header does not appear with "ids"'); $output = qx{TASKRC=bug.rc ../src/task uuids}; unlike ($output, qr/TASKRC/ms, 'The header does not appear with "uuids"'); -$output = qx{TASKRC=bug.rc ../src/task _ids}; +$output = qx{TASKRC=bug.rc ../src/task _ids 2>&1}; unlike ($output, qr/TASKRC/ms, 'The header does not appear with "_ids"'); ### Cleanup. diff --git a/test/bug.986.t b/test/bug.986.t index fd4b63eb9..fc8960480 100755 --- a/test/bug.986.t +++ b/test/bug.986.t @@ -44,17 +44,17 @@ if (open my $fh, '>', 'bug.rc') # Create one task (with a creation date) and one journal entry (with a # timestamp and a date inside the entry) -qx{../src/task rc:bug.rc add test}; -qx{../src/task rc:bug.rc test start}; +qx{../src/task rc:bug.rc add test 2>&1}; +qx{../src/task rc:bug.rc test start 2>&1}; # Test that dateformat.info has precedence over dateformat and that no other # format is applied -my $output = qx{../src/task rc:bug.rc test info rc.dateformat:m/d/Y rc.dateformat.info:__}; +my $output = qx{../src/task rc:bug.rc test info rc.dateformat:m/d/Y rc.dateformat.info:__ 2>&1}; like ($output, qr/__/ms, 'Date formatted according to dateformat.info'); unlike ($output, qr/[0-9]*\/[0-9]*\/20[0-9]*/ms, 'No date is incorrectly formatted'); # Similar for dateformat -$output = qx{../src/task rc:bug.rc test info rc.dateformat:__ rc.dateformat.info:}; +$output = qx{../src/task rc:bug.rc test info rc.dateformat:__ rc.dateformat.info: 2>&1}; like ($output, qr/__/ms, 'Date formatted according to dateformat'); ### Cleanup. diff --git a/test/bug.990.t b/test/bug.990.t index 2cf8aa0d9..7a8cdc8ea 100755 --- a/test/bug.990.t +++ b/test/bug.990.t @@ -44,8 +44,8 @@ if (open my $fh, '>', 'color.rc') # Bug that colored any task with both priority:L and a tag as though # rc.color.tagged had a higher precedence than rc.color.pri.L, which it is not. -qx{../src/task rc:color.rc add test +test pri:L}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add test +test pri:L 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ \033\[32m .* test .* \033\[0m /x, 'Colored with the priority color, which has precedence over the tagged color'); # Cleanup. diff --git a/test/bug.991.t b/test/bug.991.t index ab3004df2..0d57f49b5 100755 --- a/test/bug.991.t +++ b/test/bug.991.t @@ -43,8 +43,8 @@ if (open my $fh, '>', 'bug.rc') # - showing the list of default configuration variables # - checking that there is no error, no deprecated variable and no unrecognized variables -qx{../src/task rc:bug.rc add foo}; -my $output = qx{../src/task rc:bug.rc show}; +qx{../src/task rc:bug.rc add foo 2>&1}; +my $output = qx{../src/task rc:bug.rc show 2>&1}; unlike ($output, qr/Configuration error/ms, 'No configuration error'); unlike ($output, qr/deprecated/ms, 'No deprecated variable'); unlike ($output, qr/unrecognized/ms, 'No unrecognized variable'); diff --git a/test/bug.annotate.t b/test/bug.annotate.t index 1f9452dc7..c9cf38275 100755 --- a/test/bug.annotate.t +++ b/test/bug.annotate.t @@ -39,7 +39,7 @@ if (open my $fh, '>', 'bug.rc') } # Attempt a blank annotation. -qx{../src/task rc:bug.rc add foo}; +qx{../src/task rc:bug.rc add foo 2>&1}; my $output = qx{../src/task rc:bug.rc 1 annotate 2>&1 >/dev/null}; like ($output, qr/Additional text must be provided/, 'failed on blank annotation'); diff --git a/test/bug.annual.t b/test/bug.annual.t index 887b4234b..9652a532a 100755 --- a/test/bug.annual.t +++ b/test/bug.annual.t @@ -55,8 +55,8 @@ if (open my $fh, '>', 'annual.rc') # 11 13/29/2008 - foo # 12 12/29/2009 - foo -qx{../src/task rc:annual.rc add foo due:1/1/2000 recur:annual until:1/1/2009}; -my $output = qx{../src/task rc:annual.rc list}; +qx{../src/task rc:annual.rc add foo due:1/1/2000 recur:annual until:1/1/2009 2>&1}; +my $output = qx{../src/task rc:annual.rc list 2>&1}; like ($output, qr/2\s+1\/1\/2000\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 2 no creep'); like ($output, qr/3\s+1\/1\/2001\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 3 no creep'); like ($output, qr/4\s+1\/1\/2002\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 4 no creep'); @@ -68,7 +68,7 @@ like ($output, qr/9\s+1\/1\/2007\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 9 no cre like ($output, qr/10\s+1\/1\/2008\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 10 no creep'); like ($output, qr/11\s+1\/1\/2009\s+(?:-|\d+\ssecs?)\s+foo/, 'synthetic 11 no creep'); -$output = qx{../src/task rc:annual.rc diag}; +$output = qx{../src/task rc:annual.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/bug.before.t b/test/bug.before.t index c070ea3eb..822c5eea4 100755 --- a/test/bug.before.t +++ b/test/bug.before.t @@ -56,28 +56,28 @@ EOF } # Verify data is readable and just as expected. -my $output = qx{../src/task rc:before.rc 1 info}; +my $output = qx{../src/task rc:before.rc 1 info 2>&1}; like ($output, qr/Start\s+12\/22\/2008/, 'task 1 start date as expected'); -$output = qx{../src/task rc:before.rc 2 info}; +$output = qx{../src/task rc:before.rc 2 info 2>&1}; like ($output, qr/Start\s+4\/17\/2009/, 'task 2 start date as expected'); -$output = qx{../src/task rc:before.rc ls start.before:12/1/2008}; +$output = qx{../src/task rc:before.rc ls start.before:12/1/2008 2>&1}; unlike ($output, qr/foo/, 'no foo before 12/1/2008'); unlike ($output, qr/bar/, 'no bar before 12/1/2008'); -$output = qx{../src/task rc:before.rc ls start.before:1/1/2009}; +$output = qx{../src/task rc:before.rc ls start.before:1/1/2009 2>&1}; like ($output, qr/foo/, 'foo before 1/1/2009'); unlike ($output, qr/bar/, 'no bar before 1/1/2009'); -$output = qx{../src/task rc:before.rc ls start.before:5/1/2009}; +$output = qx{../src/task rc:before.rc ls start.before:5/1/2009 2>&1}; like ($output, qr/foo/, 'foo before 5/1/2009'); like ($output, qr/bar/, 'bar before 5/1/2009'); -$output = qx{../src/task rc:before.rc ls start.after:12/1/2008}; +$output = qx{../src/task rc:before.rc ls start.after:12/1/2008 2>&1}; like ($output, qr/foo/, 'foo after 12/1/2008'); like ($output, qr/bar/, 'bar after 12/1/2008'); -$output = qx{../src/task rc:before.rc ls start.after:1/1/2009}; +$output = qx{../src/task rc:before.rc ls start.after:1/1/2009 2>&1}; unlike ($output, qr/foo/, 'no foo after 1/1/2009'); like ($output, qr/bar/, 'bar after 1/1/2009'); -$output = qx{../src/task rc:before.rc ls start.after:5/1/2009}; +$output = qx{../src/task rc:before.rc ls start.after:5/1/2009 2>&1}; unlike ($output, qr/foo/, 'no foo after 5/1/2009'); unlike ($output, qr/bar/, 'no bar after 5/1/2009'); diff --git a/test/bug.bulk.t b/test/bug.bulk.t index 55ced2d92..069317f89 100755 --- a/test/bug.bulk.t +++ b/test/bug.bulk.t @@ -42,30 +42,30 @@ if (open my $fh, '>', 'bulk.rc') # Add some tasks with project, prioriy and due date, some with only due date. # Bulk add a project and priority to the tasks that were without. -qx{../src/task rc:bulk.rc add t1 pro:p1 pri:H due:monday}; -qx{../src/task rc:bulk.rc add t2 pro:p1 pri:M due:tuesday}; -qx{../src/task rc:bulk.rc add t3 pro:p1 pri:L due:wednesday}; -qx{../src/task rc:bulk.rc add t4 due:thursday}; -qx{../src/task rc:bulk.rc add t5 due:friday}; -qx{../src/task rc:bulk.rc add t6 due:saturday}; +qx{../src/task rc:bulk.rc add t1 pro:p1 pri:H due:monday 2>&1}; +qx{../src/task rc:bulk.rc add t2 pro:p1 pri:M due:tuesday 2>&1}; +qx{../src/task rc:bulk.rc add t3 pro:p1 pri:L due:wednesday 2>&1}; +qx{../src/task rc:bulk.rc add t4 due:thursday 2>&1}; +qx{../src/task rc:bulk.rc add t5 due:friday 2>&1}; +qx{../src/task rc:bulk.rc add t6 due:saturday 2>&1}; -my $output = qx{echo "quit"|../src/task rc:bulk.rc 4 5 6 modify pro:p1 pri:M}; +my $output = qx{echo "quit"|../src/task rc:bulk.rc 4 5 6 modify pro:p1 pri:M 2>&1}; like ($output, qr/Modified 0 tasks/, '"quit" prevents any further modifications'); -$output = qx{echo "All"|../src/task rc:bulk.rc 4 5 6 mod pro:p1 pri:M}; +$output = qx{echo "All"|../src/task rc:bulk.rc 4 5 6 mod pro:p1 pri:M 2>&1}; unlike ($output, qr/Task 4 "t4"\n - No changes were made/, 'Task 4 modified'); unlike ($output, qr/Task 5 "t5"\n - No changes were made/, 'Task 5 modified'); unlike ($output, qr/Task 6 "t6"\n - No changes were made/, 'Task 6 modified'); -$output = qx{../src/task rc:bulk.rc info 4}; +$output = qx{../src/task rc:bulk.rc info 4 2>&1}; like ($output, qr/Project\s+p1/, 'project applied to 4'); like ($output, qr/Priority\s+M/, 'priority applied to 4'); -$output = qx{../src/task rc:bulk.rc info 5}; +$output = qx{../src/task rc:bulk.rc info 5 2>&1}; like ($output, qr/Project\s+p1/, 'project applied to 5'); like ($output, qr/Priority\s+M/, 'priority applied to 5'); -$output = qx{../src/task rc:bulk.rc info 6}; +$output = qx{../src/task rc:bulk.rc info 6 2>&1}; like ($output, qr/Project\s+p1/, 'project applied to 6'); like ($output, qr/Priority\s+M/, 'priority applied to 6'); diff --git a/test/bug.c001.t b/test/bug.c001.t index 2b5903248..6e9eaf6ef 100755 --- a/test/bug.c001.t +++ b/test/bug.c001.t @@ -45,10 +45,10 @@ if (open my $fh, '>', 'bug.rc') # First noticed in 1.9.4 commit 2d50d1c # Setup: Add a recurring task -qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily}; +qx{../src/task rc:bug.rc add First recurring task due:tomorrow rec:daily 2>&1}; # Result: Ensure the second recurring task has an ID of 2 -my $output = qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily}; +my $output = qx{../src/task rc:bug.rc add Second recurring task due:tomorrow rec:daily 2>&1}; like ($output, qr/Created task 2\./ms, 'Recurring task assigned correct ID.'); # Cleanup. diff --git a/test/bug.cal.t b/test/bug.cal.t index 3b8fb7537..8401a762b 100755 --- a/test/bug.cal.t +++ b/test/bug.cal.t @@ -42,65 +42,65 @@ if (open my $fh, '>', 'cal.rc') # Bug: The 'cal' command can fail when provided with challenging arguments. # Should not fail (because they are correct): -my $output = qx{../src/task rc:cal.rc cal 2>&1 >/dev/null}; +my $output = qx{../src/task rc:cal.rc cal 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal'); # y due 2010 donkey 8 -$output = qx{../src/task rc:cal.rc cal y 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y'); -$output = qx{../src/task rc:cal.rc cal 8 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 8 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8'); -$output = qx{../src/task rc:cal.rc cal due 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal due 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due'); -$output = qx{../src/task rc:cal.rc cal 2010 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 2010 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 2010'); -$output = qx{../src/task rc:cal.rc cal donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal donkey'); # y due 2010 donkey 8 -$output = qx{../src/task rc:cal.rc cal y due 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y due 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due'); -$output = qx{../src/task rc:cal.rc cal y 8 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y 8 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8'); -$output = qx{../src/task rc:cal.rc cal y 2010 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y 2010 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 2010'); -$output = qx{../src/task rc:cal.rc cal y donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y donkey'); -$output = qx{../src/task rc:cal.rc cal 8 due 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 8 due 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due'); -$output = qx{../src/task rc:cal.rc cal 8 2010 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 8 2010 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 2010'); -$output = qx{../src/task rc:cal.rc cal 8 donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 8 donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 donkey'); -$output = qx{../src/task rc:cal.rc cal due 2010 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal due 2010 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010'); -$output = qx{../src/task rc:cal.rc cal due donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal due donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due donkey'); -$output = qx{../src/task rc:cal.rc cal 2010 donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 2010 donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 2010 donkey'); # y 8 due 2010 donkey -$output = qx{../src/task rc:cal.rc cal y 8 due 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y 8 due 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 due'); -$output = qx{../src/task rc:cal.rc cal y 8 2010 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y 8 2010 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 2010'); -$output = qx{../src/task rc:cal.rc cal y 8 donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y 8 donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 8 donkey'); -$output = qx{../src/task rc:cal.rc cal y due 2010 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y due 2010 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due 2010'); -$output = qx{../src/task rc:cal.rc cal y due donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y due donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y due donkey'); -$output = qx{../src/task rc:cal.rc cal y 2010 donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal y 2010 donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal y 2010 donkey'); -$output = qx{../src/task rc:cal.rc cal 8 due 2010 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 8 due 2010 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due 2010'); -$output = qx{../src/task rc:cal.rc cal 8 due donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 8 due donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 due donkey'); -$output = qx{../src/task rc:cal.rc cal 8 2010 donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal 8 2010 donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal 8 2010 donkey'); -$output = qx{../src/task rc:cal.rc cal due 2010 8 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal due 2010 8 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010 8'); -$output = qx{../src/task rc:cal.rc cal due 2010 donkey 2>&1 >/dev/null}; +$output = qx{../src/task rc:cal.rc cal due 2010 donkey 2>&1}; unlike ($output, qr/(?:Assertion failed|Could note recognize|not a valid)/, 'cal due 2010 donkey'); # Cleanup. diff --git a/test/bug.concat.t b/test/bug.concat.t index 044857970..f61438599 100755 --- a/test/bug.concat.t +++ b/test/bug.concat.t @@ -47,12 +47,12 @@ if (open my $fh, '>', 'bug.rc') # # Thisisanewdescription -qx{../src/task rc:bug.rc add This is the original text}; -my $output = qx{../src/task rc:bug.rc info 1}; +qx{../src/task rc:bug.rc add This is the original text 2>&1}; +my $output = qx{../src/task rc:bug.rc info 1 2>&1}; like ($output, qr/Description\s+This is the original text/, 'original correct'); -qx{../src/task rc:bug.rc 1 modify This is the modified text}; -$output = qx{../src/task rc:bug.rc info 1}; +qx{../src/task rc:bug.rc 1 modify This is the modified text 2>&1}; +$output = qx{../src/task rc:bug.rc info 1 2>&1}; like ($output, qr/Description\s+This is the modified text\n/, 'modified correct'); # When a task is added like this: @@ -63,8 +63,8 @@ like ($output, qr/Description\s+This is the modified text\n/, 'modified correct' # # aaabbb:ccc ddd -qx{../src/task rc:bug.rc add aaa bbb:ccc ddd}; -$output = qx{../src/task rc:bug.rc info 2}; +qx{../src/task rc:bug.rc add aaa bbb:ccc ddd 2>&1}; +$output = qx{../src/task rc:bug.rc info 2 2>&1}; like ($output, qr/Description\s+aaa bbb:ccc ddd\n/, 'properly concatenated'); # Cleanup. diff --git a/test/bug.hang.t b/test/bug.hang.t index 86abb81f6..ab2c18376 100755 --- a/test/bug.hang.t +++ b/test/bug.hang.t @@ -56,9 +56,9 @@ eval { $SIG{'ALRM'} = sub {die "alarm\n"}; alarm 10; - my $output = qx{../src/task rc:hang.rc list; - ../src/task rc:hang.rc add due:today recur:1d infinite loop; - ../src/task rc:hang.rc info 1}; + my $output = qx{../src/task rc:hang.rc list 2>&1; + ../src/task rc:hang.rc add due:today recur:1d infinite loop 2>&1; + ../src/task rc:hang.rc info 1 2>&1}; alarm 0; like ($output, qr/^Description\s+infinite loop\n/m, 'no hang'); diff --git a/test/bug.hasnt.t b/test/bug.hasnt.t index bff927e10..975289d77 100755 --- a/test/bug.hasnt.t +++ b/test/bug.hasnt.t @@ -40,35 +40,35 @@ if (open my $fh, '>', 'hasnt.rc') } # 1 -qx{../src/task rc:hasnt.rc add foo}; +qx{../src/task rc:hasnt.rc add foo 2>&1}; # 2 -qx{../src/task rc:hasnt.rc add foo}; -qx{../src/task rc:hasnt.rc 2 annotate bar}; +qx{../src/task rc:hasnt.rc add foo 2>&1}; +qx{../src/task rc:hasnt.rc 2 annotate bar 2>&1}; # 3 -qx{../src/task rc:hasnt.rc add foo}; -qx{../src/task rc:hasnt.rc 3 annotate bar}; -qx{../src/task rc:hasnt.rc 3 annotate baz}; +qx{../src/task rc:hasnt.rc add foo 2>&1}; +qx{../src/task rc:hasnt.rc 3 annotate bar 2>&1}; +qx{../src/task rc:hasnt.rc 3 annotate baz 2>&1}; # 4 -qx{../src/task rc:hasnt.rc add bar}; +qx{../src/task rc:hasnt.rc add bar 2>&1}; # 5 -qx{../src/task rc:hasnt.rc add bar}; -qx{../src/task rc:hasnt.rc 5 annotate foo}; +qx{../src/task rc:hasnt.rc add bar 2>&1}; +qx{../src/task rc:hasnt.rc 5 annotate foo 2>&1}; # 6 -qx{../src/task rc:hasnt.rc add bar}; -qx{../src/task rc:hasnt.rc 6 annotate foo}; -qx{../src/task rc:hasnt.rc 6 annotate baz}; +qx{../src/task rc:hasnt.rc add bar 2>&1}; +qx{../src/task rc:hasnt.rc 6 annotate foo 2>&1}; +qx{../src/task rc:hasnt.rc 6 annotate baz 2>&1}; #7 -qx{../src/task rc:hasnt.rc add one}; -qx{../src/task rc:hasnt.rc 7 annotate two}; -qx{../src/task rc:hasnt.rc 7 annotate three}; +qx{../src/task rc:hasnt.rc add one 2>&1}; +qx{../src/task rc:hasnt.rc 7 annotate two 2>&1}; +qx{../src/task rc:hasnt.rc 7 annotate three 2>&1}; -my $output = qx{../src/task rc:hasnt.rc ls description.has:foo}; +my $output = qx{../src/task rc:hasnt.rc ls description.has:foo 2>&1}; like ($output, qr/\n 1/, '1 has foo -> yes'); like ($output, qr/\n 2/, '2 has foo -> yes'); like ($output, qr/\n 3/, '3 has foo -> yes'); @@ -77,7 +77,7 @@ like ($output, qr/\n 5/, '5 has foo -> yes'); like ($output, qr/\n 6/, '6 has foo -> yes'); unlike ($output, qr/\n 7/, '7 has foo -> no'); -$output = qx{../src/task rc:hasnt.rc ls description.hasnt:foo}; +$output = qx{../src/task rc:hasnt.rc ls description.hasnt:foo 2>&1}; unlike ($output, qr/\n 1/, '1 hasnt foo -> no'); unlike ($output, qr/\n 2/, '2 hasnt foo -> no'); # 10 unlike ($output, qr/\n 3/, '3 hasnt foo -> no'); diff --git a/test/bug.period.t b/test/bug.period.t index c0cdb3b39..ddb73c5ad 100755 --- a/test/bug.period.t +++ b/test/bug.period.t @@ -74,65 +74,65 @@ Confirmed: *y =cut -my $output = qx{../src/task rc:period.rc add daily due:tomorrow recur:daily}; +my $output = qx{../src/task rc:period.rc add daily due:tomorrow recur:daily 2>&1}; unlike ($output, qr/was not recognized/, 'recur:daily'); -$output = qx{../src/task rc:period.rc add day due:tomorrow recur:day}; +$output = qx{../src/task rc:period.rc add day due:tomorrow recur:day 2>&1}; unlike ($output, qr/was not recognized/, 'recur:day'); -$output = qx{../src/task rc:period.rc add weekly due:tomorrow recur:weekly}; +$output = qx{../src/task rc:period.rc add weekly due:tomorrow recur:weekly 2>&1}; unlike ($output, qr/was not recognized/, 'recur:weekly'); -$output = qx{../src/task rc:period.rc add sennight due:tomorrow recur:sennight}; +$output = qx{../src/task rc:period.rc add sennight due:tomorrow recur:sennight 2>&1}; unlike ($output, qr/was not recognized/, 'recur:sennight'); -$output = qx{../src/task rc:period.rc add biweekly due:tomorrow recur:biweekly}; +$output = qx{../src/task rc:period.rc add biweekly due:tomorrow recur:biweekly 2>&1}; unlike ($output, qr/was not recognized/, 'recur:biweekly'); -$output = qx{../src/task rc:period.rc add fortnight due:tomorrow recur:fortnight}; +$output = qx{../src/task rc:period.rc add fortnight due:tomorrow recur:fortnight 2>&1}; unlike ($output, qr/was not recognized/, 'recur:fortnight'); -$output = qx{../src/task rc:period.rc add monthly due:tomorrow recur:monthly}; +$output = qx{../src/task rc:period.rc add monthly due:tomorrow recur:monthly 2>&1}; unlike ($output, qr/was not recognized/, 'recur:monthly'); -$output = qx{../src/task rc:period.rc add quarterly due:tomorrow recur:quarterly}; +$output = qx{../src/task rc:period.rc add quarterly due:tomorrow recur:quarterly 2>&1}; unlike ($output, qr/was not recognized/, 'recur:quarterly'); -$output = qx{../src/task rc:period.rc add semiannual due:tomorrow recur:semiannual}; +$output = qx{../src/task rc:period.rc add semiannual due:tomorrow recur:semiannual 2>&1}; unlike ($output, qr/was not recognized/, 'recur:semiannual'); -$output = qx{../src/task rc:period.rc add bimonthly due:tomorrow recur:bimonthly}; +$output = qx{../src/task rc:period.rc add bimonthly due:tomorrow recur:bimonthly 2>&1}; unlike ($output, qr/was not recognized/, 'recur:bimonthly'); -$output = qx{../src/task rc:period.rc add biannual due:tomorrow recur:biannual}; +$output = qx{../src/task rc:period.rc add biannual due:tomorrow recur:biannual 2>&1}; unlike ($output, qr/was not recognized/, 'recur:biannual'); -$output = qx{../src/task rc:period.rc add biyearly due:tomorrow recur:biyearly}; +$output = qx{../src/task rc:period.rc add biyearly due:tomorrow recur:biyearly 2>&1}; unlike ($output, qr/was not recognized/, 'recur:biyearly'); -$output = qx{../src/task rc:period.rc add annual due:tomorrow recur:annual}; +$output = qx{../src/task rc:period.rc add annual due:tomorrow recur:annual 2>&1}; unlike ($output, qr/was not recognized/, 'recur:annual'); -$output = qx{../src/task rc:period.rc add yearly due:tomorrow recur:yearly}; +$output = qx{../src/task rc:period.rc add yearly due:tomorrow recur:yearly 2>&1}; unlike ($output, qr/was not recognized/, 'recur:yearly'); -$output = qx{../src/task rc:period.rc add 2d due:tomorrow recur:2d}; +$output = qx{../src/task rc:period.rc add 2d due:tomorrow recur:2d 2>&1}; unlike ($output, qr/was not recognized/, 'recur:2d'); -$output = qx{../src/task rc:period.rc add 2w due:tomorrow recur:2w}; +$output = qx{../src/task rc:period.rc add 2w due:tomorrow recur:2w 2>&1}; unlike ($output, qr/was not recognized/, 'recur:2w'); -$output = qx{../src/task rc:period.rc add 2m due:tomorrow recur:2mo}; +$output = qx{../src/task rc:period.rc add 2m due:tomorrow recur:2mo 2>&1}; unlike ($output, qr/was not recognized/, 'recur:2m'); -$output = qx{../src/task rc:period.rc add 2q due:tomorrow recur:2q}; +$output = qx{../src/task rc:period.rc add 2q due:tomorrow recur:2q 2>&1}; unlike ($output, qr/was not recognized/, 'recur:2q'); -$output = qx{../src/task rc:period.rc add 2y due:tomorrow recur:2y}; +$output = qx{../src/task rc:period.rc add 2y due:tomorrow recur:2y 2>&1}; unlike ($output, qr/was not recognized/, 'recur:2y'); # Verify that the recurring task instances get created. One of each. -$output = qx{../src/task rc:period.rc list}; +$output = qx{../src/task rc:period.rc list 2>&1}; like ($output, qr/\bdaily\b/, 'verify daily'); like ($output, qr/\bday\b/, 'verify day'); like ($output, qr/\bweekly\b/, 'verify weekly'); @@ -153,7 +153,7 @@ like ($output, qr/\b2m\b/, 'verify 2m'); like ($output, qr/\b2q\b/, 'verify 2q'); like ($output, qr/\b2y\b/, 'verify 2y'); -$output = qx{../src/task rc:period.rc diag}; +$output = qx{../src/task rc:period.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/bug.range.t b/test/bug.range.t index b991fcc50..ea9e84fe7 100755 --- a/test/bug.range.t +++ b/test/bug.range.t @@ -40,10 +40,10 @@ if (open my $fh, '>', 'range.rc') } # Add three tasks, and attempt to list the middle one within a range. -qx{../src/task rc:range.rc add one due:8/1/2009}; -qx{../src/task rc:range.rc add two due:8/3/2009}; -qx{../src/task rc:range.rc add three due:8/5/2009}; -my $output = qx{../src/task rc:range.rc ls due.after:8/2/2009 due.before:8/4/2009}; +qx{../src/task rc:range.rc add one due:8/1/2009 2>&1}; +qx{../src/task rc:range.rc add two due:8/3/2009 2>&1}; +qx{../src/task rc:range.rc add three due:8/5/2009 2>&1}; +my $output = qx{../src/task rc:range.rc ls due.after:8/2/2009 due.before:8/4/2009 2>&1}; unlike ($output, qr/one/, 'Missing prior to range'); like ($output, qr/two/, 'Found within range'); unlike ($output, qr/three/, 'Missing after range'); diff --git a/test/bug.recur.t b/test/bug.recur.t index dd867af18..dac5c5a74 100755 --- a/test/bug.recur.t +++ b/test/bug.recur.t @@ -40,8 +40,8 @@ if (open my $fh, '>', 'recur.rc') } # Add a recurring task with no due date, look for expected error. -qx{../src/task rc:recur.rc add foo recur:daily}; -my $output = qx{../src/task rc:recur.rc info 1}; +qx{../src/task rc:recur.rc add foo recur:daily 2>&1}; +my $output = qx{../src/task rc:recur.rc info 1 2>&1}; unlike ($output, qr/Description\s+foo/, 'task not created - missing due date'); # Cleanup. diff --git a/test/bug.sort.t b/test/bug.sort.t index 5e1814636..148679800 100755 --- a/test/bug.sort.t +++ b/test/bug.sort.t @@ -38,16 +38,16 @@ if (open my $fh, '>', 'bug_sort.rc') ok (-r 'bug_sort.rc', 'Created bug_sort.rc'); } -my $setup = "../src/task rc:bug_sort.rc add one;" - . "../src/task rc:bug_sort.rc add two;" - . "../src/task rc:bug_sort.rc add three recur:daily due:eom;"; +my $setup = "../src/task rc:bug_sort.rc add one 2>&1;" + . "../src/task rc:bug_sort.rc add two 2>&1;" + . "../src/task rc:bug_sort.rc add three recur:daily due:eom 2>&1;"; qx{$setup}; -my $output = qx{../src/task rc:bug_sort.rc list}; +my $output = qx{../src/task rc:bug_sort.rc list 2>&1}; like ($output, qr/three.*(?:one.*two|two.*one)/msi, 'list did not hang'); -qx{../src/task rc:bug_sort.rc 1 modify priority:H}; -$output = qx{../src/task rc:bug_sort.rc list}; +qx{../src/task rc:bug_sort.rc 1 modify priority:H 2>&1}; +$output = qx{../src/task rc:bug_sort.rc list 2>&1}; like ($output, qr/three.*one.*two/msi, 'list did not hang after pri:H on 1'); # Cleanup. diff --git a/test/bug.start.extra.t b/test/bug.start.extra.t index b50d30353..45cbc6c1c 100755 --- a/test/bug.start.extra.t +++ b/test/bug.start.extra.t @@ -39,10 +39,10 @@ if (open my $fh, '>', 'extra.rc') ok (-r 'extra.rc', 'Created extra.rc'); } -qx{../src/task rc:extra.rc add foo}; -qx{../src/task rc:extra.rc 1 start pri:L}; -qx{../src/task rc:extra.rc 1 stop pro:bar}; -my $output = qx{../src/task rc:extra.rc list}; +qx{../src/task rc:extra.rc add foo 2>&1}; +qx{../src/task rc:extra.rc 1 start pri:L 2>&1}; +qx{../src/task rc:extra.rc 1 stop pro:bar 2>&1}; +my $output = qx{../src/task rc:extra.rc list 2>&1}; like ($output, qr/foo/, 'Task shown'); like ($output, qr/1 task/, 'Correct count'); like ($output, qr/L/, 'Correct priority'); diff --git a/test/bug.summary.t b/test/bug.summary.t index b3d6e4a8f..407346a46 100755 --- a/test/bug.summary.t +++ b/test/bug.summary.t @@ -41,16 +41,16 @@ if (open my $fh, '>', 'summary.rc') # Add three tasks. Do 1, delete 1, leave 1 pending. Summary should depict a # 50% completion. -qx{../src/task rc:summary.rc add project:A one}; -qx{../src/task rc:summary.rc add project:A two}; -qx{../src/task rc:summary.rc add project:A three}; -qx{../src/task rc:summary.rc 1 do}; -qx{../src/task rc:summary.rc 2 delete}; -my $output = qx{../src/task rc:summary.rc summary}; +qx{../src/task rc:summary.rc add project:A one 2>&1}; +qx{../src/task rc:summary.rc add project:A two 2>&1}; +qx{../src/task rc:summary.rc add project:A three 2>&1}; +qx{../src/task rc:summary.rc 1 do 2>&1}; +qx{../src/task rc:summary.rc 2 delete 2>&1}; +my $output = qx{../src/task rc:summary.rc summary 2>&1}; like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% before report'); -qx{../src/task rc:summary.rc list}; -$output = qx{../src/task rc:summary.rc summary}; +qx{../src/task rc:summary.rc list 2>&1}; +$output = qx{../src/task rc:summary.rc summary 2>&1}; like ($output, qr/A\s+1\s+(?:-|\d\ssecs?)\s+50%/, 'summary correctly shows 50% after report'); # Cleanup. diff --git a/test/bug.uuid.t b/test/bug.uuid.t index 69d94a606..2c51d3419 100755 --- a/test/bug.uuid.t +++ b/test/bug.uuid.t @@ -41,39 +41,39 @@ if (open my $fh, '>', 'uuid.rc') # Add a task, dup it, add a recurring task, list. Then make sure they all have # unique UUID values. -qx{../src/task rc:uuid.rc add simple}; -qx{../src/task rc:uuid.rc 1 duplicate}; -qx{../src/task rc:uuid.rc add periodic recur:daily due:yesterday}; -qx{../src/task rc:uuid.rc ls}; +qx{../src/task rc:uuid.rc add simple 2>&1}; +qx{../src/task rc:uuid.rc 1 duplicate 2>&1}; +qx{../src/task rc:uuid.rc add periodic recur:daily due:yesterday 2>&1}; +qx{../src/task rc:uuid.rc ls 2>&1}; my @all_uuids; my %unique_uuids; -my $output = qx{../src/task rc:uuid.rc 1 info}; +my $output = qx{../src/task rc:uuid.rc 1 info 2>&1}; my ($uuid) = $output =~ /UUID\s+(\S+)/; push @all_uuids, $uuid; $unique_uuids{$uuid} = undef; -$output = qx{../src/task rc:uuid.rc 2 info}; +$output = qx{../src/task rc:uuid.rc 2 info 2>&1}; ($uuid) = $output =~ /UUID\s+(\S+)/; push @all_uuids, $uuid; $unique_uuids{$uuid} = undef; -$output = qx{../src/task rc:uuid.rc 3 info}; +$output = qx{../src/task rc:uuid.rc 3 info 2>&1}; ($uuid) = $output =~ /UUID\s+(\S+)/; push @all_uuids, $uuid; $unique_uuids{$uuid} = undef; -$output = qx{../src/task rc:uuid.rc 4 info}; +$output = qx{../src/task rc:uuid.rc 4 info 2>&1}; ($uuid) = $output =~ /UUID\s+(\S+)/; push @all_uuids, $uuid; $unique_uuids{$uuid} = undef; -$output = qx{../src/task rc:uuid.rc 5 info}; +$output = qx{../src/task rc:uuid.rc 5 info 2>&1}; ($uuid) = $output =~ /UUID\s+(\S+)/; push @all_uuids, $uuid; $unique_uuids{$uuid} = undef; -$output = qx{../src/task rc:uuid.rc 6 info}; +$output = qx{../src/task rc:uuid.rc 6 info 2>&1}; ($uuid) = $output =~ /UUID\s+(\S+)/; push @all_uuids, $uuid; $unique_uuids{$uuid} = undef; @@ -81,7 +81,7 @@ $unique_uuids{$uuid} = undef; is (scalar (@all_uuids), 6, '6 tasks created'); is (scalar (keys %unique_uuids), 6, '6 unique UUIDs'); -$output = qx{../src/task rc:uuid.rc diag}; +$output = qx{../src/task rc:uuid.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/bulk.t b/test/bulk.t index ffe025c8d..4a67e9849 100755 --- a/test/bulk.t +++ b/test/bulk.t @@ -40,24 +40,24 @@ if (open my $fh, '>', 'bulk.rc') } # Exercise bulk and non-bulk confirmations for 'delete' and 'modify'. -qx{../src/task rc:bulk.rc add one}; -qx{../src/task rc:bulk.rc add two}; -qx{../src/task rc:bulk.rc add three}; -qx{../src/task rc:bulk.rc add four}; -qx{../src/task rc:bulk.rc add five}; -qx{../src/task rc:bulk.rc add six}; -qx{../src/task rc:bulk.rc add seven}; -qx{../src/task rc:bulk.rc add eight}; -qx{../src/task rc:bulk.rc add nine}; -qx{../src/task rc:bulk.rc add ten}; -qx{../src/task rc:bulk.rc add eleven}; -qx{../src/task rc:bulk.rc add twelve}; -qx{../src/task rc:bulk.rc add thirteen}; -qx{../src/task rc:bulk.rc add fourteen}; -qx{../src/task rc:bulk.rc add fifteen}; -qx{../src/task rc:bulk.rc add sixteen}; -qx{../src/task rc:bulk.rc add seventeen}; -qx{../src/task rc:bulk.rc add eighteen}; +qx{../src/task rc:bulk.rc add one 2>&1}; +qx{../src/task rc:bulk.rc add two 2>&1}; +qx{../src/task rc:bulk.rc add three 2>&1}; +qx{../src/task rc:bulk.rc add four 2>&1}; +qx{../src/task rc:bulk.rc add five 2>&1}; +qx{../src/task rc:bulk.rc add six 2>&1}; +qx{../src/task rc:bulk.rc add seven 2>&1}; +qx{../src/task rc:bulk.rc add eight 2>&1}; +qx{../src/task rc:bulk.rc add nine 2>&1}; +qx{../src/task rc:bulk.rc add ten 2>&1}; +qx{../src/task rc:bulk.rc add eleven 2>&1}; +qx{../src/task rc:bulk.rc add twelve 2>&1}; +qx{../src/task rc:bulk.rc add thirteen 2>&1}; +qx{../src/task rc:bulk.rc add fourteen 2>&1}; +qx{../src/task rc:bulk.rc add fifteen 2>&1}; +qx{../src/task rc:bulk.rc add sixteen 2>&1}; +qx{../src/task rc:bulk.rc add seventeen 2>&1}; +qx{../src/task rc:bulk.rc add eighteen 2>&1}; # The 'delete' command is used, but it could be any write command. # Note that 'y' is passed to task despite rc.confirmation=off. This allows @@ -66,38 +66,38 @@ qx{../src/task rc:bulk.rc add eighteen}; # 'yes' tests: # Test with 1 task. 1 is a special case. -my $output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=off 1 delete}; +my $output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=off 1 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Single delete with no confirmation'); unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation'); like ($output, qr/Deleting task 1/, 'Verified delete 1'); -$output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=on 2 delete}; +$output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=on 2 delete 2>&1}; like ($output, qr/\(yes\/no\)/, 'Single delete with confirmation'); unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation'); like ($output, qr/Deleting task 2/, 'Verified delete 2'); # Test with 2 tasks. 2 is greater than 1 and less than bulk. -$output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=off 3-4 delete}; +$output = qx{echo 'y' | ../src/task rc:bulk.rc rc.confirmation=off 3-4 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with no confirmation'); unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with no bulk confirmation'); like ($output, qr/Deleting task 3/, 'Verified delete 3'); like ($output, qr/Deleting task 4/, 'Verified delete 4'); -$output = qx{printf 'y\ny\n' | ../src/task rc:bulk.rc rc.confirmation=on 5-6 delete}; +$output = qx{printf 'y\ny\n' | ../src/task rc:bulk.rc rc.confirmation=on 5-6 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with confirmation'); like ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with bulk confirmation'); like ($output, qr/Deleting task 5/, 'Verified delete 5'); like ($output, qr/Deleting task 6/, 'Verified delete 6'); # Test with 3 tasks. 3 is considered bulk. -$output = qx{printf 'y\ny\ny\n' | ../src/task rc:bulk.rc rc.confirmation=off 7-9 delete}; +$output = qx{printf 'y\ny\ny\n' | ../src/task rc:bulk.rc rc.confirmation=off 7-9 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with no confirmation'); like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation'); like ($output, qr/Deleting task 7/, 'Verified delete 7'); like ($output, qr/Deleting task 8/, 'Verified delete 8'); like ($output, qr/Deleting task 9/, 'Verified delete 9'); -$output = qx{printf 'y\ny\ny\n' | ../src/task rc:bulk.rc rc.confirmation=on 10-12 delete}; +$output = qx{printf 'y\ny\ny\n' | ../src/task rc:bulk.rc rc.confirmation=on 10-12 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation'); like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with bulk confirmation'); like ($output, qr/Deleting task 10/, 'Verified delete 10'); @@ -107,25 +107,25 @@ like ($output, qr/Deleting task 12/, 'Verified delete 12'); # 'no' tests: # Test with 1 task, denying delete. -$output = qx{echo 'n' | ../src/task rc:bulk.rc rc.confirmation=on 13 delete}; +$output = qx{echo 'n' | ../src/task rc:bulk.rc rc.confirmation=on 13 delete 2>&1}; like ($output, qr/\(yes\/no\)/, 'Single delete with confirmation'); unlike ($output, qr/\(yes\/no\/all\/quit\)/, 'Single delete with no bulk confirmation'); unlike ($output, qr/Deleting task/, 'Verified no delete 13'); # Test with 2 tasks, denying delete. -$output = qx{printf 'n\nn\n' | ../src/task rc:bulk.rc rc.confirmation=on 13-14 delete}; +$output = qx{printf 'n\nn\n' | ../src/task rc:bulk.rc rc.confirmation=on 13-14 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Multiple delete with confirmation'); like ($output, qr/\(yes\/no\/all\/quit\)/, 'Multiple delete with no bulk confirmation'); unlike ($output, qr/Deleting task/, 'Verified no delete 13-14'); # Test with 3 tasks, denying delete. -$output = qx{printf 'n\nn\nn\n' | ../src/task rc:bulk.rc rc.confirmation=on 13-15 delete}; +$output = qx{printf 'n\nn\nn\n' | ../src/task rc:bulk.rc rc.confirmation=on 13-15 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation'); like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation'); unlike ($output, qr/Deleting task/, 'Verified no delete 13-15'); # 'all' tests: -$output = qx{echo 'all' | ../src/task rc:bulk.rc rc.confirmation=on 13-15 delete}; +$output = qx{echo 'all' | ../src/task rc:bulk.rc rc.confirmation=on 13-15 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with confirmation'); like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with bulk confirmation'); like ($output, qr/Deleting task/, 'Verified delete 13'); @@ -133,7 +133,7 @@ like ($output, qr/Deleting task/, 'Verified delete 14'); like ($output, qr/Deleting task/, 'Verified delete 15'); # 'quit' tests: -$output = qx{echo 'quit' | ../src/task rc:bulk.rc rc.confirmation=on 16-18 delete}; +$output = qx{echo 'quit' | ../src/task rc:bulk.rc rc.confirmation=on 16-18 delete 2>&1}; unlike ($output, qr/\(yes\/no\)/, 'Bulk delete with no confirmation'); like ($output, qr/\(yes\/no\/all\/quit\)/, 'Bulk delete with no bulk confirmation'); unlike ($output, qr/Deleting task/, 'Verified delete 16'); diff --git a/test/cal.t b/test/cal.t index e22216952..8697dd1d3 100755 --- a/test/cal.t +++ b/test/cal.t @@ -65,7 +65,7 @@ if ($day <= 9) } # task cal and task cal y -my $output = qx{../src/task rc:cal.rc rc._forcecolor:on cal}; +my $output = qx{../src/task rc:cal.rc rc._forcecolor:on cal 2>&1}; if ($wday == 6 || $wday == 0) { like ($output, qr/\[30;106m$day/, 'Current day is highlighted'); @@ -75,14 +75,14 @@ else like ($output, qr/\[30;46m$day/, 'Current day is highlighted'); } like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed'); -$output = qx{../src/task rc:cal.rc add zero}; +$output = qx{../src/task rc:cal.rc add zero 2>&1}; unlike ($output, qr/\[41m\d+/, 'No overdue tasks are present'); unlike ($output, qr/\[43m\d+/, 'No due tasks are present'); -$output = qx{../src/task rc:cal.rc rc.weekstart:Sunday cal}; +$output = qx{../src/task rc:cal.rc rc.weekstart:Sunday cal 2>&1}; like ($output, qr/Su Mo Tu/, 'Week starts on Sunday'); -$output = qx{../src/task rc:cal.rc rc.weekstart:Monday cal}; +$output = qx{../src/task rc:cal.rc rc.weekstart:Monday cal 2>&1}; like ($output, qr/Fr Sa Su/, 'Week starts on Monday'); -$output = qx{../src/task rc:cal.rc cal y}; +$output = qx{../src/task rc:cal.rc cal y 2>&1}; like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed'); if ($month eq "Jan") { @@ -96,21 +96,21 @@ if ($month eq "Jan") unlike ($output, qr/$month\S*?\s+?$nextyear/, 'Current month and year ahead are not displayed'); # task cal due and task cal due y -qx{../src/task rc:cal.rc add due:20190515 one}; -qx{../src/task rc:cal.rc add due:20200123 two}; -$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due}; +qx{../src/task rc:cal.rc add due:20190515 one 2>&1}; +qx{../src/task rc:cal.rc add due:20200123 two 2>&1}; +$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due 2>&1}; unlike ($output, qr/April 2019/, 'April 2019 is not displayed'); like ($output, qr/May 2019/, 'May 2019 is displayed'); unlike ($output, qr/January 2020/, 'January 2020 is not displayed'); like ($output, qr/30;42m15/, 'Task 1 is color-coded due'); -$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due y}; +$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due y 2>&1}; like ($output, qr/30;42m23/, 'Task 2 is color-coded due'); like ($output, qr/April 2020/, 'April 2020 is displayed'); unlike ($output, qr/May 2020/, 'May 2020 is not displayed'); -qx{../src/task rc:cal.rc ls}; -qx{../src/task rc:cal.rc 1-3 del}; -qx{../src/task rc:cal.rc add due:20080408 three}; -$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due}; +qx{../src/task rc:cal.rc ls 2>&1}; +qx{../src/task rc:cal.rc 1-3 del 2>&1}; +qx{../src/task rc:cal.rc add due:20080408 three 2>&1}; +$output = qx{../src/task rc:cal.rc rc._forcecolor:on cal due 2>&1}; like ($output, qr/April 2008/, 'April 2008 is displayed'); like ($output, qr/41m 8/, 'Task 3 is color-coded overdue'); like ($output, qr/37;100m19/, 'Saturday April 19, 2008 is color-coded'); @@ -118,7 +118,7 @@ like ($output, qr/37;100m20/, 'Sunday April 20, 2008 is color-coded'); like ($output, qr/30;47m 1/, 'Weeknumbers are color-coded'); # task cal 2016 -$output = qx{../src/task rc:cal.rc rc.weekstart:Monday cal 2016}; +$output = qx{../src/task rc:cal.rc rc.weekstart:Monday cal 2016 2>&1}; unlike ($output, qr/2015/, 'Year 2015 is not displayed'); unlike ($output, qr/2017/, 'Year 2017 is not displayed'); like ($output, qr/January 2016/, 'January 2016 is displayed'); @@ -127,32 +127,32 @@ like ($output, qr/53 +1/, '2015 has 53 weeks (ISO)'); like ($output, qr/1 +4/, 'First week in 2016 starts with Mon Jan 4 (ISO)'); like ($output, qr/52 +26/, 'Last week in 2016 starts with Mon Dec 26 (ISO)'); like ($output, qr/9 +29/, 'Leap year - Feb 29 is Monday in week 9 (ISO)'); -$output = qx{../src/task rc:cal.rc rc.weekstart:Sunday cal 2016}; +$output = qx{../src/task rc:cal.rc rc.weekstart:Sunday cal 2016 2>&1}; like ($output, qr/1 +1/, 'First week in 2016 starts with Fri Jan 1 (US)'); like ($output, qr/53 +25/, 'Last week in 2016 starts with Sun Dec 25 (US)'); -$output = qx{../src/task rc:cal.rc rc.weekstart:Monday rc.displayweeknumber:off cal 2016}; +$output = qx{../src/task rc:cal.rc rc.weekstart:Monday rc.displayweeknumber:off cal 2016 2>&1}; unlike ($output, qr/53/, 'Weeknumbers are not displayed'); # task cal 4 2010 -$output = qx{../src/task rc:cal.rc rc.monthsperline:1 cal 4 2010}; +$output = qx{../src/task rc:cal.rc rc.monthsperline:1 cal 4 2010 2>&1}; unlike ($output, qr/March 2010/, 'March 2010 is not displayed'); like ($output, qr/April 2010/, 'April 2010 is displayed'); unlike ($output, qr/May 2010/, 'May 2010 is not displayed'); # calendar offsets -$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.monthsperline:1 cal 1 2011}; +$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.monthsperline:1 cal 1 2011 2>&1}; unlike ($output, qr/November 2010/, 'November 2010 is not displayed'); like ($output, qr/December 2010/, 'December 2010 is displayed'); unlike ($output, qr/January 2011/, 'January 2011 is not displayed'); -$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:2 rc.monthsperline:1 cal 1 2011}; +$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:2 rc.monthsperline:1 cal 1 2011 2>&1}; unlike ($output, qr/January 2011/, 'January 2011 is not displayed'); unlike ($output, qr/February 2011/, 'February 2011 is not displayed'); like ($output, qr/March 2011/, 'March 2011 is displayed'); unlike ($output, qr/April 2011/, 'April 2011 is not displayed'); -$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:-12 rc.monthsperline:1 cal}; +$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:-12 rc.monthsperline:1 cal 2>&1}; like ($output, qr/$month\S*?\s+?$prevyear/, 'Current month and year ahead are displayed'); unlike ($output, qr/$month\S*?\s+?$year/, 'Current month and year are not displayed'); -$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:12 rc.monthsperline:1 cal}; +$output = qx{../src/task rc:cal.rc rc.calendar.offset:on rc.calendar.offset.value:12 rc.monthsperline:1 cal 2>&1}; unlike ($output, qr/$month\S*?\s+?$year/, 'Current month and year are not displayed'); like ($output, qr/$month\S*?\s+?$nextyear/, 'Current month and year ahead are displayed'); @@ -190,19 +190,19 @@ if (open my $fh, '>', 'details.rc') } # task calendar details -qx{../src/task rc:details.rc add due:20150105 one}; -qx{../src/task rc:details.rc add due:20150110 two}; -qx{../src/task rc:details.rc add due:20150210 three}; -qx{../src/task rc:details.rc add due:20150410 four}; -qx{../src/task rc:details.rc add due:20151225 five}; -qx{../src/task rc:details.rc add due:20141231 six}; -qx{../src/task rc:details.rc add due:20160101 seven}; -qx{../src/task rc:details.rc add due:20081231 eight}; +qx{../src/task rc:details.rc add due:20150105 one 2>&1}; +qx{../src/task rc:details.rc add due:20150110 two 2>&1}; +qx{../src/task rc:details.rc add due:20150210 three 2>&1}; +qx{../src/task rc:details.rc add due:20150410 four 2>&1}; +qx{../src/task rc:details.rc add due:20151225 five 2>&1}; +qx{../src/task rc:details.rc add due:20141231 six 2>&1}; +qx{../src/task rc:details.rc add due:20160101 seven 2>&1}; +qx{../src/task rc:details.rc add due:20081231 eight 2>&1}; -$output = qx{../src/task rc:details.rc rc.calendar.legend:no cal}; +$output = qx{../src/task rc:details.rc rc.calendar.legend:no cal 2>&1}; unlike ($output, qr/Legend:/, 'Legend is not displayed'); -$output = qx{../src/task rc:details.rc cal rc.monthsperline:3 1 2015}; +$output = qx{../src/task rc:details.rc cal rc.monthsperline:3 1 2015 2>&1}; like ($output, qr/January 2015/, 'January 2015 is displayed'); like ($output, qr/20150105/, 'Due date 20150105 is displayed'); like ($output, qr/20150110/, 'Due date 20150110 is displayed'); @@ -211,12 +211,12 @@ unlike ($output, qr/20141231/, 'Due date 20141231 is not displayed'); unlike ($output, qr/20150410/, 'Due date 20150410 is not displayed'); like ($output, qr/3 tasks/, '3 due tasks are displayed'); -$output = qx{../src/task rc:details.rc cal due}; +$output = qx{../src/task rc:details.rc cal due 2>&1}; like ($output, qr/December 2008/, 'December 2008 is displayed'); like ($output, qr/20081231/, 'Due date 20081231 is displayed'); like ($output, qr/1 task/, '1 due task is displayed'); -$output = qx{../src/task rc:details.rc cal 2015}; +$output = qx{../src/task rc:details.rc cal 2015 2>&1}; like ($output, qr/January 2015/, 'January 2015 is displayed'); like ($output, qr/December 2015/, 'December 2015 is displayed'); unlike ($output, qr/20141231/, 'Due date 20141231 is not displayed'); @@ -235,13 +235,13 @@ if ( $mon <= 9) } my $duedate = $year.$mon.$day; -qx{../src/task rc:details.rc add due:$duedate rc.monthsperline:1 nine}; -$output = qx{../src/task rc:details.rc cal}; +qx{../src/task rc:details.rc add due:$duedate rc.monthsperline:1 nine 2>&1}; +$output = qx{../src/task rc:details.rc cal 2>&1}; like ($output, qr/$month\S*?\s+?$year/, 'Current month and year are displayed'); like ($output, qr/$duedate/, 'Due date on current day is displayed'); like ($output, qr/1 task/, '1 due task is displayed'); -$output = qx{../src/task rc:details.rc cal rc.monthsperline:1 1 2015}; +$output = qx{../src/task rc:details.rc cal rc.monthsperline:1 1 2015 2>&1}; like ($output, qr/Date/, 'Word Date is displayed'); like ($output, qr/Holiday/, 'Word Holiday is displayed'); like ($output, qr/20150101/, 'Holiday 20150101 is displayed'); @@ -251,7 +251,7 @@ like ($output, qr/AAAA/, 'Holiday name AAAA is displayed'); like ($output, qr/BBBBBB/, 'Holiday name BBBBBB is displayed'); like ($output, qr/åäö/, 'Holiday name åäö is displayed'); -$output = qx{../src/task rc:details.rc cal rc._forcecolor:on rc.monthsperline:1 rc.calendar.details:sparse rc.calendar.holidays:sparse 1 2015}; +$output = qx{../src/task rc:details.rc cal rc._forcecolor:on rc.monthsperline:1 rc.calendar.details:sparse rc.calendar.holidays:sparse 1 2015 2>&1}; unlike ($output, qr/Date/, 'Word Date is not displayed'); unlike ($output, qr/Holiday/, 'Word Holiday is not displayed'); like ($output, qr/30;103m 1/, 'Holiday AAAA is color-coded'); diff --git a/test/caseless.t b/test/caseless.t index 2161d2ec8..65b223f2e 100755 --- a/test/caseless.t +++ b/test/caseless.t @@ -39,83 +39,83 @@ if (open my $fh, '>', 'caseless.rc') } # Attempt case-sensitive and case-insensitive substitutions and filters. -qx{../src/task rc:caseless.rc add one two three}; -qx{../src/task rc:caseless.rc 1 annotate four five six}; +qx{../src/task rc:caseless.rc add one two three 2>&1}; +qx{../src/task rc:caseless.rc 1 annotate four five six 2>&1}; # Description substitution. # 2 -qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /One/ONE/}; -my $output = qx{../src/task rc:caseless.rc info 1}; +qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /One/ONE/ 2>&1}; +my $output = qx{../src/task rc:caseless.rc info 1 2>&1}; unlike ($output, qr/One two three/, 'one two three\nfour five six -> /One/ONE/ = fail'); # 3 -qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /One/ONE/}; -$output = qx{../src/task rc:caseless.rc info 1}; +qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /One/ONE/ 2>&1}; +$output = qx{../src/task rc:caseless.rc info 1 2>&1}; like ($output, qr/ONE two three/, 'one two three\nfour five six -> /One/ONE/ = caseless succeed'); # 4 -qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /one/One/}; -$output = qx{../src/task rc:caseless.rc info 1}; +qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /one/One/ 2>&1}; +$output = qx{../src/task rc:caseless.rc info 1 2>&1}; unlike ($output, qr/One two three/, 'ONE two three\nfour five six -> /one/ONE/ = fail'); # 5 -qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /one/one/}; -$output = qx{../src/task rc:caseless.rc info 1}; +qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /one/one/ 2>&1}; +$output = qx{../src/task rc:caseless.rc info 1 2>&1}; like ($output, qr/one two three/, 'ONE two three\nfour five six -> /one/one/ = caseless succeed'); # Annotation substitution. # 6 -qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /Five/FIVE/}; -$output = qx{../src/task rc:caseless.rc info 1}; +qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /Five/FIVE/ 2>&1}; +$output = qx{../src/task rc:caseless.rc info 1 2>&1}; unlike ($output, qr/four FIVE six/, 'one two three\nfour five six -> /Five/FIVE/ = fail'); # 7 -qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /Five/FIVE/}; -$output = qx{../src/task rc:caseless.rc info 1}; +qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /Five/FIVE/ 2>&1}; +$output = qx{../src/task rc:caseless.rc info 1 2>&1}; like ($output, qr/four FIVE six/, 'one two three\nfour five six -> /Five/FIVE/ = caseless succeed'); # 8 -qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /five/Five/}; -$output = qx{../src/task rc:caseless.rc info 1}; +qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes 1 modify /five/Five/ 2>&1}; +$output = qx{../src/task rc:caseless.rc info 1 2>&1}; unlike ($output, qr/four Five six/, 'one two three\nfour FIVE six -> /five/Five/ = fail'); # 9 -qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /five/five/}; -$output = qx{../src/task rc:caseless.rc info 1}; +qx{../src/task rc:caseless.rc rc.search.case.sensitive:no 1 modify /five/five/ 2>&1}; +$output = qx{../src/task rc:caseless.rc info 1 2>&1}; like ($output, qr/four five six/, 'one two three\nfour FIVE six -> /five/five/ = caseless succeed'); # Description filter. # 10 -$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls One}; +$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls One 2>&1}; unlike ($output, qr/one two three/, 'one two three\nfour five six -> ls One = fail'); # 11 -$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls One}; +$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls One 2>&1}; like ($output, qr/one two three/, 'one two three\nfour five six -> ls One caseless = succeed'); # 12 -$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls Five}; +$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls Five 2>&1}; unlike ($output, qr/four five six/, 'one two three\nfour five six -> ls Five = fail'); # 13 -$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls Five}; +$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls Five 2>&1}; like ($output, qr/four five six/, 'one two three\nfour five six -> ls Five caseless = succeed'); # Annotation filter. # 14 -$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls description.contains:Three}; +$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls description.contains:Three 2>&1}; unlike ($output, qr/one two three/, 'one two three\nfour five six -> ls description.contains:Three = fail'); # 15 -$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls description.contains:Three}; +$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls description.contains:Three 2>&1}; like ($output, qr/one two three/, 'one two three\nfour five six -> ls description.contains:Three caseless = succeed'); # 16 -$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls description.contains:Six}; +$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:yes ls description.contains:Six 2>&1}; unlike ($output, qr/four five six/, 'one two three\nfour five six -> ls description.contains:Six = fail'); # 17 -$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls description.contains:Six}; +$output = qx{../src/task rc:caseless.rc rc.search.case.sensitive:no ls description.contains:Six 2>&1}; like ($output, qr/four five six/, 'one two three\nfour five six -> ls description.contains:Six caseless = succeed'); # Cleanup. diff --git a/test/color.active.t b/test/color.active.t index 4362bde92..d7e648fb8 100755 --- a/test/color.active.t +++ b/test/color.active.t @@ -41,10 +41,10 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add nothing}; -qx{../src/task rc:color.rc add red}; -qx{../src/task rc:color.rc 2 start}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add nothing 2>&1}; +qx{../src/task rc:color.rc add red 2>&1}; +qx{../src/task rc:color.rc 2 start 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.active'); diff --git a/test/color.blocked.t b/test/color.blocked.t index bebe69fa2..8d5d5688b 100755 --- a/test/color.blocked.t +++ b/test/color.blocked.t @@ -42,10 +42,10 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add red}; -qx{../src/task rc:color.rc add nothing}; -qx{../src/task rc:color.rc 1 modify depends:2}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add red 2>&1}; +qx{../src/task rc:color.rc add nothing 2>&1}; +qx{../src/task rc:color.rc 1 modify depends:2 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.blocked'); diff --git a/test/color.deprecated.t b/test/color.deprecated.t index 364c354dc..08b6936b6 100755 --- a/test/color.deprecated.t +++ b/test/color.deprecated.t @@ -41,7 +41,7 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -my $output = qx{../src/task rc:color.rc show}; +my $output = qx{../src/task rc:color.rc show 2>&1}; like ($output, qr/that use deprecated underscores/ms, 'Deprecated color detected'); # Cleanup. diff --git a/test/color.disable.t b/test/color.disable.t index b85fd4fa5..42e7b0fee 100755 --- a/test/color.disable.t +++ b/test/color.disable.t @@ -41,8 +41,8 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add priority:H red}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add priority:H red 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/red/, 'color.disable - found red'); unlike ($output, qr/\033\[31m/, 'color.disable - no color red'); diff --git a/test/color.due.t b/test/color.due.t index e591245d2..e73e5a85d 100755 --- a/test/color.due.t +++ b/test/color.due.t @@ -41,9 +41,9 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add due:12/31/2037 nothing}; -qx{../src/task rc:color.rc add due:tomorrow red}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add due:12/31/2037 nothing 2>&1}; +qx{../src/task rc:color.rc add due:tomorrow red 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.due'); diff --git a/test/color.duetoday.t b/test/color.duetoday.t index 5a699b0ae..0a85f04f4 100755 --- a/test/color.duetoday.t +++ b/test/color.duetoday.t @@ -41,9 +41,9 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add due:12/31/2037 nothing}; -qx{../src/task rc:color.rc add due:5minutes red}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add due:12/31/2037 nothing 2>&1}; +qx{../src/task rc:color.rc add due:5minutes red 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none'); like ($output, qr/ (?:\033\[31m|\033\[38;5;9m) .* red .* \033\[0m/x, 'color.due.today'); diff --git a/test/color.keyword.t b/test/color.keyword.t index 13c36aa4d..2ec928591 100755 --- a/test/color.keyword.t +++ b/test/color.keyword.t @@ -46,12 +46,12 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add nothing}; -qx{../src/task rc:color.rc add red}; -qx{../src/task rc:color.rc add green}; -qx{../src/task rc:color.rc add -- annotation}; -qx{../src/task rc:color.rc 4 annotate yellow}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add nothing 2>&1}; +qx{../src/task rc:color.rc add red 2>&1}; +qx{../src/task rc:color.rc add green 2>&1}; +qx{../src/task rc:color.rc add -- annotation 2>&1}; +qx{../src/task rc:color.rc 4 annotate yellow 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.keyword.red'); diff --git a/test/color.overdue.t b/test/color.overdue.t index 6fc89e9e0..24e43327c 100755 --- a/test/color.overdue.t +++ b/test/color.overdue.t @@ -41,9 +41,9 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add due:tomorrow nothing}; -qx{../src/task rc:color.rc add due:yesterday red}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add due:tomorrow nothing 2>&1}; +qx{../src/task rc:color.rc add due:yesterday red 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ (?!<\033\[\d\dm) \d{1,2}\/\d{1,2}\/\d{4} (?!>\033\[0m) .* nothing /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.overdue'); diff --git a/test/color.pri.t b/test/color.pri.t index 4406df346..4e487d159 100755 --- a/test/color.pri.t +++ b/test/color.pri.t @@ -45,11 +45,11 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add priority:H red}; -qx{../src/task rc:color.rc add priority:M green}; -qx{../src/task rc:color.rc add priority:L blue}; -qx{../src/task rc:color.rc add yellow}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add priority:H red 2>&1}; +qx{../src/task rc:color.rc add priority:M green 2>&1}; +qx{../src/task rc:color.rc add priority:L blue 2>&1}; +qx{../src/task rc:color.rc add yellow 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.pri.H'); like ($output, qr/ \033\[32m .* green .* \033\[0m /x, 'color.pri.M'); diff --git a/test/color.project.t b/test/color.project.t index f853b24a3..a338d3d2e 100755 --- a/test/color.project.t +++ b/test/color.project.t @@ -43,9 +43,9 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add nothing}; -qx{../src/task rc:color.rc add project:x red}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add nothing 2>&1}; +qx{../src/task rc:color.rc add project:x red 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ \033\[32m .* nothing .* \033\[0m /x, 'color.project.none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.project.red'); diff --git a/test/color.recurring.t b/test/color.recurring.t index ff9c8f201..fcbc51558 100755 --- a/test/color.recurring.t +++ b/test/color.recurring.t @@ -42,9 +42,9 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add nothing}; -qx{../src/task rc:color.rc add due:tomorrow recur:1w red}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add nothing 2>&1}; +qx{../src/task rc:color.rc add due:tomorrow recur:1w red 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.recurring'); diff --git a/test/color.tag.t b/test/color.tag.t index 59ccd5673..d92a26904 100755 --- a/test/color.tag.t +++ b/test/color.tag.t @@ -45,10 +45,10 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add nothing}; -qx{../src/task rc:color.rc add +red red}; -qx{../src/task rc:color.rc add +green green}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add nothing 2>&1}; +qx{../src/task rc:color.rc add +red red 2>&1}; +qx{../src/task rc:color.rc add +green green 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ \033\[33m .* nothing .* \033\[0m /x, 'color.tag.none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tag.red'); diff --git a/test/color.tagged.t b/test/color.tagged.t index b0904c3c4..4ba428a31 100755 --- a/test/color.tagged.t +++ b/test/color.tagged.t @@ -45,9 +45,9 @@ if (open my $fh, '>', 'color.rc') } # Test the add command. -qx{../src/task rc:color.rc add nothing}; -qx{../src/task rc:color.rc add +tag red}; -my $output = qx{../src/task rc:color.rc list}; +qx{../src/task rc:color.rc add nothing 2>&1}; +qx{../src/task rc:color.rc add +tag red 2>&1}; +my $output = qx{../src/task rc:color.rc list 2>&1}; like ($output, qr/ (?!<\033\[\d\dm) .* nothing .* (?!>\033\[0m) /x, 'none'); like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tagged'); diff --git a/test/completed.t b/test/completed.t index 94821e261..3ebdefc84 100755 --- a/test/completed.t +++ b/test/completed.t @@ -40,13 +40,13 @@ if (open my $fh, '>', 'completed.rc') } # Add two tasks, mark 1 as done, the other as deleted. -qx{../src/task rc:completed.rc add one}; -qx{../src/task rc:completed.rc add two}; -qx{../src/task rc:completed.rc 1 done}; -qx{../src/task rc:completed.rc 2 delete}; +qx{../src/task rc:completed.rc add one 2>&1}; +qx{../src/task rc:completed.rc add two 2>&1}; +qx{../src/task rc:completed.rc 1 done 2>&1}; +qx{../src/task rc:completed.rc 2 delete 2>&1}; # Generate completed report. -my $output = qx{../src/task rc:completed.rc completed}; +my $output = qx{../src/task rc:completed.rc completed 2>&1}; like ($output, qr/one/, 'one -> completed'); unlike ($output, qr/two/, 'two -> deleted'); diff --git a/test/config.obsolete.t b/test/config.obsolete.t index 93b1cbb4f..7b0a7b68e 100755 --- a/test/config.obsolete.t +++ b/test/config.obsolete.t @@ -40,7 +40,7 @@ if (open my $fh, '>', 'obsolete.rc') } # Test the add command. -my $output = qx{../src/task rc:obsolete.rc show}; +my $output = qx{../src/task rc:obsolete.rc show 2>&1}; like ($output, qr/Your .taskrc file contains these unrecognized variables:\n/, 'unsupported configuration variable'); diff --git a/test/confirmation.t b/test/confirmation.t index b4da384c6..3dae8d9af 100755 --- a/test/confirmation.t +++ b/test/confirmation.t @@ -47,52 +47,52 @@ if (open my $fh, '>', 'response.txt') ok (-r 'response.txt', 'Created response.txt'); } -qx{../src/task rc:confirm.rc add foo} for 1..10; +qx{../src/task rc:confirm.rc add foo 2>&1} for 1..10; # Test the various forms of "Yes". -my $output = qx{echo "Yes" | ../src/task rc:confirm.rc 1 del}; +my $output = qx{echo "Yes" | ../src/task rc:confirm.rc 1 del 2>&1}; like ($output, qr/Permanently delete task 1 'foo'\? \(yes\/no\)/, 'confirmation - Yes works'); unlike ($output, qr/Task not deleted\./, 'confirmation - Yes works'); -$output = qx{echo "ye" | ../src/task rc:confirm.rc 2 del}; +$output = qx{echo "ye" | ../src/task rc:confirm.rc 2 del 2>&1}; like ($output, qr/Permanently delete task 2 'foo'\? \(yes\/no\)/, 'confirmation - ye works'); unlike ($output, qr/Task not deleted\./, 'confirmation - ye works'); -$output = qx{echo "y" | ../src/task rc:confirm.rc 3 del}; +$output = qx{echo "y" | ../src/task rc:confirm.rc 3 del 2>&1}; like ($output, qr/Permanently delete task 3 'foo'\? \(yes\/no\)/, 'confirmation - y works'); unlike ($output, qr/Task not deleted\./, 'confirmation - y works'); -$output = qx{echo "YES" | ../src/task rc:confirm.rc 4 del}; +$output = qx{echo "YES" | ../src/task rc:confirm.rc 4 del 2>&1}; like ($output, qr/Permanently delete task 4 'foo'\? \(yes\/no\)/, 'confirmation - YES works'); unlike ($output, qr/Task not deleted\./, 'confirmation - YES works'); # 10 -$output = qx{echo "YE" | ../src/task rc:confirm.rc 5 del}; +$output = qx{echo "YE" | ../src/task rc:confirm.rc 5 del 2>&1}; like ($output, qr/Permanently delete task 5 'foo'\? \(yes\/no\)/, 'confirmation - YE works'); unlike ($output, qr/Task not deleted\./, 'confirmation - YE works'); -$output = qx{echo "Y" | ../src/task rc:confirm.rc 6 del}; +$output = qx{echo "Y" | ../src/task rc:confirm.rc 6 del 2>&1}; like ($output, qr/Permanently delete task 6 'foo'\? \(yes\/no\)/, 'confirmation - Y works'); unlike ($output, qr/Task not deleted\./, 'confirmation - Y works'); # Test the various forms of "no". -$output = qx{echo "no" | ../src/task rc:confirm.rc 7 del}; +$output = qx{echo "no" | ../src/task rc:confirm.rc 7 del 2>&1}; like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - no works'); like ($output, qr/Task not deleted\./, 'confirmation - no works'); -$output = qx{echo "n" | ../src/task rc:confirm.rc 7 del}; +$output = qx{echo "n" | ../src/task rc:confirm.rc 7 del 2>&1}; like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - n works'); like ($output, qr/Task not deleted\./, 'confirmation - n works'); -$output = qx{echo "NO" | ../src/task rc:confirm.rc 7 del}; +$output = qx{echo "NO" | ../src/task rc:confirm.rc 7 del 2>&1}; like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - NO works'); like ($output, qr/Task not deleted\./, 'confirmation - NO works'); # 20 -$output = qx{echo "N" | ../src/task rc:confirm.rc 7 del}; +$output = qx{echo "N" | ../src/task rc:confirm.rc 7 del 2>&1}; like ($output, qr/Permanently delete task 7 'foo'\? \(yes\/no\)/, 'confirmation - N works'); like ($output, qr/Task not deleted\./, 'confirmation - N works'); # Test newlines. -$output = qx{cat response.txt | ../src/task rc:confirm.rc 7 del}; +$output = qx{cat response.txt | ../src/task rc:confirm.rc 7 del 2>&1}; like ($output, qr/(Permanently delete task 7 'foo'\? \(yes\/no\)) \1 \1/, 'confirmation - \n re-prompt works'); # 43 # Cleanup. diff --git a/test/count.t b/test/count.t index 6f20f4168..2a64a2e2a 100755 --- a/test/count.t +++ b/test/count.t @@ -40,31 +40,31 @@ if (open my $fh, '>', 'count.rc') } # Test the count command. -qx{../src/task rc:count.rc add one}; -qx{../src/task rc:count.rc log two}; -qx{../src/task rc:count.rc add three}; -qx{../src/task rc:count.rc 2 delete}; -qx{../src/task rc:count.rc add four wait:eom}; +qx{../src/task rc:count.rc add one 2>&1}; +qx{../src/task rc:count.rc log two 2>&1}; +qx{../src/task rc:count.rc add three 2>&1}; +qx{../src/task rc:count.rc 2 delete 2>&1}; +qx{../src/task rc:count.rc add four wait:eom 2>&1}; # TODO This fails when today == eom. For example, on 2012-04-30 at 8:00:00, the # value for 'eom' is 2012-04-30 0:00:00, which is already past due, which # means a second child task is generated. This would be fixed by 'eom' # expanding to 2012-04-30 24:00:00, as per ISO-8601. -qx{../src/task rc:count.rc add five due:eom recur:monthly}; +qx{../src/task rc:count.rc add five due:eom recur:monthly 2>&1}; -my $output = qx{../src/task rc:count.rc count}; +my $output = qx{../src/task rc:count.rc count 2>&1}; like ($output, qr/^5\n/ms, 'count'); -$output = qx{../src/task rc:count.rc count status:deleted rc.debug:1}; +$output = qx{../src/task rc:count.rc count status:deleted rc.debug:1 2>&1}; like ($output, qr/^1\n/ms, 'count status:deleted'); -$output = qx{../src/task rc:count.rc count e}; +$output = qx{../src/task rc:count.rc count e 2>&1}; like ($output, qr/^3\n/ms, 'count e'); -$output = qx{../src/task rc:count.rc count description.startswith:f}; +$output = qx{../src/task rc:count.rc count description.startswith:f 2>&1}; like ($output, qr/^2\n/ms, 'count description.startswith:f'); -$output = qx{../src/task rc:count.rc count due.any:}; +$output = qx{../src/task rc:count.rc count due.any: 2>&1}; like ($output, qr/^1\n/ms, 'count due.any:'); # Cleanup. diff --git a/test/countdown.t b/test/countdown.t index 06fc755a4..94c50e171 100755 --- a/test/countdown.t +++ b/test/countdown.t @@ -64,29 +64,29 @@ if (open my $fh, '>', 'countdown.rc') # Create a variety of pending tasks with increasingly higher due dates # to ensure proper sort order. -qx{../src/task rc:countdown.rc add one due:-1.2y}; -qx{../src/task rc:countdown.rc add two due:-9mo}; -qx{../src/task rc:countdown.rc add three due:-2mo}; -qx{../src/task rc:countdown.rc add four due:-3wk}; -qx{../src/task rc:countdown.rc add five due:-7d}; -qx{../src/task rc:countdown.rc add six due:-2d}; -qx{../src/task rc:countdown.rc add seven due:-1d}; -qx{../src/task rc:countdown.rc add eight due:-12h}; -qx{../src/task rc:countdown.rc add nine due:-6h}; -qx{../src/task rc:countdown.rc add ten due:-1h}; -qx{../src/task rc:countdown.rc add eleven due:-30s}; -qx{../src/task rc:countdown.rc add twelve due:1h}; -qx{../src/task rc:countdown.rc add thirteen due:6h}; -qx{../src/task rc:countdown.rc add fourteen due:12h}; -qx{../src/task rc:countdown.rc add fifteen due:1d}; -qx{../src/task rc:countdown.rc add sixteen due:2d}; -qx{../src/task rc:countdown.rc add seventeen due:7d}; -qx{../src/task rc:countdown.rc add eighteen due:3wk}; -qx{../src/task rc:countdown.rc add nineteen due:2mo}; -qx{../src/task rc:countdown.rc add twenty due:9mo}; -qx{../src/task rc:countdown.rc add twentyone due:1.2y}; +qx{../src/task rc:countdown.rc add one due:-1.2y 2>&1}; +qx{../src/task rc:countdown.rc add two due:-9mo 2>&1}; +qx{../src/task rc:countdown.rc add three due:-2mo 2>&1}; +qx{../src/task rc:countdown.rc add four due:-3wk 2>&1}; +qx{../src/task rc:countdown.rc add five due:-7d 2>&1}; +qx{../src/task rc:countdown.rc add six due:-2d 2>&1}; +qx{../src/task rc:countdown.rc add seven due:-1d 2>&1}; +qx{../src/task rc:countdown.rc add eight due:-12h 2>&1}; +qx{../src/task rc:countdown.rc add nine due:-6h 2>&1}; +qx{../src/task rc:countdown.rc add ten due:-1h 2>&1}; +qx{../src/task rc:countdown.rc add eleven due:-30s 2>&1}; +qx{../src/task rc:countdown.rc add twelve due:1h 2>&1}; +qx{../src/task rc:countdown.rc add thirteen due:6h 2>&1}; +qx{../src/task rc:countdown.rc add fourteen due:12h 2>&1}; +qx{../src/task rc:countdown.rc add fifteen due:1d 2>&1}; +qx{../src/task rc:countdown.rc add sixteen due:2d 2>&1}; +qx{../src/task rc:countdown.rc add seventeen due:7d 2>&1}; +qx{../src/task rc:countdown.rc add eighteen due:3wk 2>&1}; +qx{../src/task rc:countdown.rc add nineteen due:2mo 2>&1}; +qx{../src/task rc:countdown.rc add twenty due:9mo 2>&1}; +qx{../src/task rc:countdown.rc add twentyone due:1.2y 2>&1}; -my $output = qx{../src/task rc:countdown.rc up}; +my $output = qx{../src/task rc:countdown.rc up 2>&1}; like ($output, qr/\bone\b.+\btwo\b/ms, 'up: one < two'); like ($output, qr/\btwo\b.+\bthree/ms, 'up: two < three'); like ($output, qr/\bthree\b.+\bfour/ms, 'up: three < four'); @@ -108,7 +108,7 @@ like ($output, qr/\beighteen\b.+\bnineteen/ms, 'up: eighteen < nineteen'); like ($output, qr/\bnineteen\b.+\btwenty/ms, 'up: nineteen < twenty'); like ($output, qr/\btwenty\b.+\btwentyone/ms, 'up: twenty < twentyone'); -$output = qx{../src/task rc:countdown.rc down}; +$output = qx{../src/task rc:countdown.rc down 2>&1}; like ($output, qr/\btwentyone\b.+\btwenty/ms, 'down: twentyone < twenty'); like ($output, qr/\btwenty\b.+\bnineteen/ms, 'down: twenty < nineteen'); like ($output, qr/\bnineteen\b.+\beighteen/ms, 'down: nineteen < eighteen'); @@ -130,7 +130,7 @@ like ($output, qr/\bfour\b.+\bthree/ms, 'down: four < three'); like ($output, qr/\bthree\b.+\btwo/ms, 'down: three < two'); like ($output, qr/\btwo\b.+\bone\b/ms, 'down: two < one'); -$output = qx{../src/task rc:countdown.rc upc}; +$output = qx{../src/task rc:countdown.rc upc 2>&1}; like ($output, qr/\bone\b.+\btwo\b/ms, 'upc: one < two'); like ($output, qr/\btwo\b.+\bthree/ms, 'upc: two < three'); like ($output, qr/\bthree\b.+\bfour/ms, 'upc: three < four'); @@ -152,7 +152,7 @@ like ($output, qr/\beighteen\b.+\bnineteen/ms, 'upc: eighteen < nineteen'); like ($output, qr/\bnineteen\b.+\btwenty/ms, 'upc: nineteen < twenty'); like ($output, qr/\btwenty\b.+\btwentyone/ms, 'upc: twenty < twentyone'); -$output = qx{../src/task rc:countdown.rc downc}; +$output = qx{../src/task rc:countdown.rc downc 2>&1}; like ($output, qr/\btwentyone\b.+\btwenty/ms, 'downc: twentyone < twenty'); like ($output, qr/\btwenty\b.+\bnineteen/ms, 'downc: twenty < nineteen'); like ($output, qr/\bnineteen\b.+\beighteen/ms, 'downc: nineteen < eighteen'); diff --git a/test/custom.priority_long.t b/test/custom.priority_long.t index d93e3e333..0be49b859 100755 --- a/test/custom.priority_long.t +++ b/test/custom.priority_long.t @@ -43,11 +43,11 @@ if (open my $fh, '>', 'pri.rc') } # Generate the usage screen, and locate the custom report on it. -qx{../src/task rc:pri.rc add one pri:H}; -qx{../src/task rc:pri.rc add two pri:M}; -qx{../src/task rc:pri.rc add three pri:L}; +qx{../src/task rc:pri.rc add one pri:H 2>&1}; +qx{../src/task rc:pri.rc add two pri:M 2>&1}; +qx{../src/task rc:pri.rc add three pri:L 2>&1}; -my $output = qx{../src/task rc:pri.rc foo}; +my $output = qx{../src/task rc:pri.rc foo 2>&1}; like ($output, qr/ID.+Pri/, 'priority.long indicator heading'); like ($output, qr/1\s+High/, 'priority.long High'); like ($output, qr/2\s+Medium/, 'priority.long Medium'); diff --git a/test/custom.recur_ind.t b/test/custom.recur_ind.t index 72095cfa9..06394af42 100755 --- a/test/custom.recur_ind.t +++ b/test/custom.recur_ind.t @@ -43,14 +43,14 @@ if (open my $fh, '>', 'custom.rc') } # Add a recurring and non-recurring task, look for the indicator. -qx{../src/task rc:custom.rc add foo due:tomorrow recur:weekly}; -qx{../src/task rc:custom.rc add bar}; -my $output = qx{../src/task rc:custom.rc foo}; +qx{../src/task rc:custom.rc add foo due:tomorrow recur:weekly 2>&1}; +qx{../src/task rc:custom.rc add bar 2>&1}; +my $output = qx{../src/task rc:custom.rc foo 2>&1}; like ($output, qr/ID.+R/, 'Recurrence indicator heading'); like ($output, qr/3\s+R/, 'Recurrence indicator t1'); unlike ($output, qr/2\s+R/, 'No recurrence indicator t2'); -$output = qx{../src/task rc:custom.rc foo rc.recurrence.indicator=RE}; +$output = qx{../src/task rc:custom.rc foo rc.recurrence.indicator=RE 2>&1}; like ($output, qr/3\s+RE/, 'Custom recurrence indicator t1'); unlike ($output, qr/2\s+RE/, 'No custom recurrence indicator t2'); diff --git a/test/custom.t b/test/custom.t index 8000c4ad6..eed3e1525 100755 --- a/test/custom.t +++ b/test/custom.t @@ -43,12 +43,12 @@ if (open my $fh, '>', 'custom.rc') } # Generate the help screen, and locate the custom report on it. -my $output = qx{../src/task rc:custom.rc help}; +my $output = qx{../src/task rc:custom.rc help 2>&1}; like ($output, qr/task foo\s+DESC\n/m, 'report.foo'); -qx{../src/task rc:custom.rc add project:A one}; -qx{../src/task rc:custom.rc add two}; -$output = qx{../src/task rc:custom.rc foo}; +qx{../src/task rc:custom.rc add project:A one 2>&1}; +qx{../src/task rc:custom.rc add two 2>&1}; +$output = qx{../src/task rc:custom.rc foo 2>&1}; like ($output, qr/one/, 'custom filter included'); unlike ($output, qr/two/, 'custom filter excluded'); diff --git a/test/custom.tag_ind.t b/test/custom.tag_ind.t index dd8ee88ee..ae69a0c13 100755 --- a/test/custom.tag_ind.t +++ b/test/custom.tag_ind.t @@ -43,14 +43,14 @@ if (open my $fh, '>', 'custom.rc') } # Generate the usage screen, and locate the custom report on it. -qx{../src/task rc:custom.rc add foo +tag}; -qx{../src/task rc:custom.rc add bar}; -my $output = qx{../src/task rc:custom.rc foo}; +qx{../src/task rc:custom.rc add foo +tag 2>&1}; +qx{../src/task rc:custom.rc add bar 2>&1}; +my $output = qx{../src/task rc:custom.rc foo 2>&1}; like ($output, qr/ID.+T/, 'Tag indicator heading'); like ($output, qr/1\s+\+/, 'Tag indicator t1'); unlike ($output, qr/2\s+\+/, 'No tag indicator t2'); -$output = qx{../src/task rc:custom.rc foo rc.tag.indicator=TAG}; +$output = qx{../src/task rc:custom.rc foo rc.tag.indicator=TAG 2>&1}; like ($output, qr/1\s+TAG/, 'Custom ag indicator t1'); unlike ($output, qr/2\s+TAG/, 'No custom tag indicator t2'); diff --git a/test/date.iso.t b/test/date.iso.t index ef4e5f493..839b1274f 100755 --- a/test/date.iso.t +++ b/test/date.iso.t @@ -40,13 +40,13 @@ if (open my $fh, '>', 'iso.rc') } # Test use of ISO date format, despite rc.dateformat. -qx{../src/task rc:iso.rc add one due:20110901T120000Z}; -my $output = qx{../src/task rc:iso.rc 1 info}; +qx{../src/task rc:iso.rc add one due:20110901T120000Z 2>&1}; +my $output = qx{../src/task rc:iso.rc 1 info 2>&1}; like ($output, qr/Due\s+9\/1\/2011/, 'ISO format recognized.'); # Test use of epoch date format, despite rc.dateformat. -qx{../src/task rc:iso.rc add one due:1234524690}; -$output = qx{../src/task rc:iso.rc 2 info}; +qx{../src/task rc:iso.rc add one due:1234524690 2>&1}; +$output = qx{../src/task rc:iso.rc 2 info 2>&1}; like ($output, qr/Due\s+2\/13\/2009/, 'Epoch format recognized.'); # Cleanup. diff --git a/test/dateformat.t b/test/dateformat.t index c6f65da12..486bc43a4 100755 --- a/test/dateformat.t +++ b/test/dateformat.t @@ -63,24 +63,24 @@ if (open my $fh, '>', 'date3.rc') ok (-r 'date3.rc', 'Created date3.rc'); } -qx{../src/task rc:date1.rc add foo due:20091231}; -my $output = qx{../src/task rc:date1.rc info 1}; +qx{../src/task rc:date1.rc add foo due:20091231 2>&1}; +my $output = qx{../src/task rc:date1.rc info 1 2>&1}; like ($output, qr/\b20091231\b/, 'date format YMD parsed'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); -qx{../src/task rc:date2.rc add foo due:12/1/09}; -$output = qx{../src/task rc:date2.rc info 1}; +qx{../src/task rc:date2.rc add foo due:12/1/09 2>&1}; +$output = qx{../src/task rc:date2.rc info 1 2>&1}; like ($output, qr/\b12\/1\/09\b/, 'date format m/d/y parsed'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); -qx{../src/task rc:date3.rc add foo due:4/8/10}; -$output = qx{../src/task rc:date3.rc list}; +qx{../src/task rc:date3.rc add foo due:4/8/10 2>&1}; +$output = qx{../src/task rc:date3.rc list 2>&1}; like ($output, qr/Thursday 08 April 2010 \(v14\)/, 'date format A D B Y (vV) parsed'); -$output = qx{../src/task rc:date3.rc rc.dateformat.report:"D b Y - a" list}; +$output = qx{../src/task rc:date3.rc rc.dateformat.report:"D b Y - a" list 2>&1}; like ($output, qr/08 Apr 2010 - Thu/, 'date format D b Y - a parsed'); # Cleanup. diff --git a/test/datesort.t b/test/datesort.t index 31362174f..a5cdfeb04 100755 --- a/test/datesort.t +++ b/test/datesort.t @@ -46,14 +46,14 @@ if (open my $fh, '>', 'datesort.rc') ok (-r 'datesort.rc', 'Created datesort.rc'); } -qx{../src/task rc:datesort.rc add two due:20100201}; -qx{../src/task rc:datesort.rc add one due:20100101}; -qx{../src/task rc:datesort.rc add three due:20100301}; +qx{../src/task rc:datesort.rc add two due:20100201 2>&1}; +qx{../src/task rc:datesort.rc add one due:20100101 2>&1}; +qx{../src/task rc:datesort.rc add three due:20100301 2>&1}; -my $output = qx{../src/task rc:datesort.rc small_list}; +my $output = qx{../src/task rc:datesort.rc small_list 2>&1}; like ($output, qr/one.+two.+three/ms, 'Sorting by due+ with format MD works'); -$output = qx{../src/task rc:datesort.rc rc.report.small_list.sort=due- small_list}; +$output = qx{../src/task rc:datesort.rc rc.report.small_list.sort=due- small_list 2>&1}; like ($output, qr/three.+two.+one/ms, 'Sorting by due- with format MD works'); # Cleanup. diff --git a/test/default.t b/test/default.t index ba5aea2ed..9f66d5a3f 100755 --- a/test/default.t +++ b/test/default.t @@ -43,43 +43,43 @@ if (open my $fh, '>', 'default.rc') } # Set up a default command, project and priority. -qx{../src/task rc:default.rc add all defaults}; -my $output = qx{../src/task rc:default.rc list}; +qx{../src/task rc:default.rc add all defaults 2>&1}; +my $output = qx{../src/task rc:default.rc list 2>&1}; like ($output, qr/ all defaults/, 'task added'); like ($output, qr/ PROJECT /, 'default project added'); like ($output, qr/ M /, 'default priority added'); like ($output, qr/\//, 'default due added'); unlink 'pending.data'; -qx{../src/task rc:default.rc add project:specific priority:L due:eoy all specified}; -$output = qx{../src/task rc:default.rc list}; +qx{../src/task rc:default.rc add project:specific priority:L due:eoy all specified 2>&1}; +$output = qx{../src/task rc:default.rc list 2>&1}; like ($output, qr/ all specified/, 'task added'); like ($output, qr/ specific /, 'project specified'); like ($output, qr/ L /, 'priority specified'); like ($output, qr/\//, 'due specified'); unlink 'pending.data'; -qx{../src/task rc:default.rc add project:specific project specified}; -$output = qx{../src/task rc:default.rc list}; +qx{../src/task rc:default.rc add project:specific project specified 2>&1}; +$output = qx{../src/task rc:default.rc list 2>&1}; like ($output, qr/ project specified/, 'task added'); like ($output, qr/ specific /, 'project specified'); like ($output, qr/ M /, 'default priority added'); like ($output, qr/\//, 'default due added'); unlink 'pending.data'; -qx{../src/task rc:default.rc add priority:L priority specified}; -$output = qx{../src/task rc:default.rc list}; +qx{../src/task rc:default.rc add priority:L priority specified 2>&1}; +$output = qx{../src/task rc:default.rc list 2>&1}; like ($output, qr/ priority specified/, 'task added'); like ($output, qr/ PROJECT /, 'default project added'); like ($output, qr/ L /, 'priority specified'); like ($output, qr/\//, 'default due added'); -$output = qx{../src/task rc:default.rc}; +$output = qx{../src/task rc:default.rc 2>&1}; like ($output, qr/1 PROJECT L .+ priority specified/, 'default command worked'); -qx{../src/task rc:default.rc add project:HOME priority:M due:tomorrow all specified}; -qx{echo 'y' | ../src/task rc:default.rc config default.command 'list priority:M'}; -$output = qx{../src/task rc:default.rc}; +qx{../src/task rc:default.rc add project:HOME priority:M due:tomorrow all specified 2>&1}; +qx{echo 'y' | ../src/task rc:default.rc config default.command 'list priority:M' 2>&1}; +$output = qx{../src/task rc:default.rc 2>&1}; like ($output, qr/ M /, 'priority:M included in default command'); unlike ($output, qr/ L /, 'priority:L excluded from default command'); diff --git a/test/delete.t b/test/delete.t index 44df4fe05..e2c74d90d 100755 --- a/test/delete.t +++ b/test/delete.t @@ -41,19 +41,19 @@ if (open my $fh, '>', 'delete.rc') } # Add a task, delete it, undelete it. -my $output = qx{../src/task rc:delete.rc add one; ../src/task rc:delete.rc info 1}; +my $output = qx{../src/task rc:delete.rc add one 2>&1; ../src/task rc:delete.rc info 1 2>&1}; ok (-r 'pending.data', 'pending.data created'); like ($output, qr/Status\s+Pending\n/, 'Pending'); -$output = qx{../src/task rc:delete.rc 1 delete; ../src/task rc:delete.rc info 1}; +$output = qx{../src/task rc:delete.rc 1 delete 2>&1; ../src/task rc:delete.rc info 1 2>&1}; like ($output, qr/Status\s+Deleted\n/, 'Deleted'); ok (-r 'completed.data', 'completed.data created'); -$output = qx{echo 'y' | ../src/task rc:delete.rc undo; ../src/task rc:delete.rc info 1}; +$output = qx{echo 'y' | ../src/task rc:delete.rc undo 2>&1; ../src/task rc:delete.rc info 1 2>&1}; like ($output, qr/Status\s+Pending\n/, 'Pending'); ok (-r 'completed.data', 'completed.data created'); -$output = qx{../src/task rc:delete.rc 1 delete; ../src/task rc:delete.rc list 2>&1 >/dev/null}; +$output = qx{../src/task rc:delete.rc 1 delete 2>&1; ../src/task rc:delete.rc list 2>&1 >/dev/null}; like ($output, qr/No matches./, 'No matches'); ok (-r 'completed.data', 'completed.data created'); @@ -61,23 +61,23 @@ $output = qx{../src/task rc:delete.rc info 1 2>&1 >/dev/null}; like ($output, qr/No matches\./, 'No matches'); # 10 # Add a task, delete it, and modify on the fly. -qx{../src/task rc:delete.rc add one two}; -$output = qx{../src/task rc:delete.rc list}; +qx{../src/task rc:delete.rc add one two 2>&1}; +$output = qx{../src/task rc:delete.rc list 2>&1}; like ($output, qr/one two/, 'Second task added'); -qx{../src/task rc:delete.rc 1 delete foo pri:H}; -$output = qx{../src/task rc:delete.rc 1 info}; +qx{../src/task rc:delete.rc 1 delete foo pri:H 2>&1}; +$output = qx{../src/task rc:delete.rc 1 info 2>&1}; like ($output, qr/foo/, 'Deletion annotation successful'); like ($output, qr/H/, 'Deletion modification successful'); # Add a task, complete it, then delete it. -qx{../src/task rc:delete.rc add three}; -$output = qx{../src/task rc:delete.rc 2 info}; +qx{../src/task rc:delete.rc add three 2>&1}; +$output = qx{../src/task rc:delete.rc 2 info 2>&1}; like ($output, qr/three/, 'added and verified new task'); my ($uuid) = $output =~ /UUID\s+(\S+)/; -qx{../src/task rc:delete.rc 2 done}; -qx{../src/task rc:delete.rc $uuid delete}; -$output = qx{../src/task rc:delete.rc $uuid info}; +qx{../src/task rc:delete.rc 2 done 2>&1}; +qx{../src/task rc:delete.rc $uuid delete 2>&1}; +$output = qx{../src/task rc:delete.rc $uuid info 2>&1}; like ($output, qr/Deleted/, 'task added, completed, then deleted'); # Cleanup. diff --git a/test/denotate.t b/test/denotate.t index 1952db32e..9282aa10a 100755 --- a/test/denotate.t +++ b/test/denotate.t @@ -45,16 +45,16 @@ if (open my $fh, '>', 'denotate.rc') } # Add four tasks, annotate one three times, one twice, one just once and one none. -qx{../src/task rc:denotate.rc add one}; -qx{../src/task rc:denotate.rc 1 annotate Ernie}; -qx{../src/task rc:denotate.rc 1 annotate Bert}; -qx{../src/task rc:denotate.rc 1 annotate Bibo}; -qx{../src/task rc:denotate.rc 1 annotate Kermit the frog}; -qx{../src/task rc:denotate.rc 1 annotate Kermit the frog}; -qx{../src/task rc:denotate.rc 1 annotate Kermit}; -qx{../src/task rc:denotate.rc 1 annotate Kermit and Miss Piggy}; +qx{../src/task rc:denotate.rc add one 2>&1}; +qx{../src/task rc:denotate.rc 1 annotate Ernie 2>&1}; +qx{../src/task rc:denotate.rc 1 annotate Bert 2>&1}; +qx{../src/task rc:denotate.rc 1 annotate Bibo 2>&1}; +qx{../src/task rc:denotate.rc 1 annotate Kermit the frog 2>&1}; +qx{../src/task rc:denotate.rc 1 annotate Kermit the frog 2>&1}; +qx{../src/task rc:denotate.rc 1 annotate Kermit 2>&1}; +qx{../src/task rc:denotate.rc 1 annotate Kermit and Miss Piggy 2>&1}; -my $output = qx{../src/task rc:denotate.rc rrr}; +my $output = qx{../src/task rc:denotate.rc rrr 2>&1}; like ($output, qr/1 one/, 'task 1'); like ($output, qr/one.+\d{1,2}\/\d{1,2}\/\d{4} Ernie/ms, 'first annotation'); like ($output, qr/Ernie.+\d{1,2}\/\d{1,2}\/\d{4} Bert/ms, 'second annotation'); @@ -65,36 +65,36 @@ like ($output, qr/frog.+\d{1,2}\/\d{1,2}\/\d{4} Kermit/ms, 'six like ($output, qr/Kermit.+\d{1,2}\/\d{1,2}\/\d{4} Kermit and Miss Piggy/ms, 'seventh annotation'); like ($output, qr/1 task/, 'count'); # 10 -qx{../src/task rc:denotate.rc 1 denotate Ernie}; -$output = qx{../src/task rc:denotate.rc rrr}; +qx{../src/task rc:denotate.rc 1 denotate Ernie 2>&1}; +$output = qx{../src/task rc:denotate.rc rrr 2>&1}; unlike ($output, qr/one.+\d{1,2}\/\d{1,2}\/\d{4} Ernie/ms, 'Delete annotation'); like ($output, qr/one.+\d{1,2}\/\d{1,2}\/\d{4} Bert/ms, 'Bert now first annotationt'); -qx{../src/task rc:denotate.rc 1 denotate Bi}; -$output = qx{../src/task rc:denotate.rc rrr}; +qx{../src/task rc:denotate.rc 1 denotate Bi 2>&1}; +$output = qx{../src/task rc:denotate.rc rrr 2>&1}; unlike ($output, qr/Bert.+\d{1,2}\/\d{1,2}\/\d{4} Bibo/ms, 'Delete partial match'); like ($output, qr/Bert.+\d{1,2}\/\d{1,2}\/\d{4} Kermit the frog/ms, 'Kermit the frog now second annotation'); -qx{../src/task rc:denotate.rc 1 denotate BErt}; -$output = qx{../src/task rc:denotate.rc rrr}; +qx{../src/task rc:denotate.rc 1 denotate BErt 2>&1}; +$output = qx{../src/task rc:denotate.rc rrr 2>&1}; like ($output, qr/one.+\d{1,2}\/\d{1,2}\/\d{4} Bert/ms, 'Denotate is case sensitive'); # 15 like ($output, qr/Bert.+\d{1,2}\/\d{1,2}\/\d{4} Kermit the frog/ms, 'Kermit the frog still second annoation'); -qx{../src/task rc:denotate.rc 1 denotate Kermit}; -$output = qx{../src/task rc:denotate.rc rrr}; +qx{../src/task rc:denotate.rc 1 denotate Kermit 2>&1}; +$output = qx{../src/task rc:denotate.rc rrr 2>&1}; like ($output, qr/one.+\d{1,2}\/\d{1,2}\/\d{4} Bert/ms, 'Exact match deletion - Bert'); like ($output, qr/Bert.+\d{1,2}\/\d{1,2}\/\d{4} Kermit the frog/ms, 'Exact match deletion - Kermit the frog'); like ($output, qr/frog.+\d{1,2}\/\d{1,2}\/\d{4} Kermit the frog/ms, 'Exact match deletion - Kermit the frog'); like ($output, qr/frog.+\d{1,2}\/\d{1,2}\/\d{4} Kermit and Miss Piggy/ms, 'Exact match deletion - Kermit and Miss Piggy'); # 20 -qx{../src/task rc:denotate.rc 1 denotate Kermit the}; -$output = qx{../src/task rc:denotate.rc rrr}; +qx{../src/task rc:denotate.rc 1 denotate Kermit the 2>&1}; +$output = qx{../src/task rc:denotate.rc rrr 2>&1}; like ($output, qr/one.+\d{1,2}\/\d{1,2}\/\d{4} Bert/ms, 'Delete just one annotation - Bert'); like ($output, qr/Bert.+\d{1,2}\/\d{1,2}\/\d{4} Kermit the frog/ms, 'Delete just one annotation - Kermit the frog'); like ($output, qr/frog.+\d{1,2}\/\d{1,2}\/\d{4} Kermit and Miss Piggy/ms, 'Delete just one annotation - Kermit and Miss Piggy'); -$output = qx{../src/task rc:denotate.rc 1 denotate Kermit a}; -$output = qx{../src/task rc:denotate.rc rrr}; +$output = qx{../src/task rc:denotate.rc 1 denotate Kermit a 2>&1}; +$output = qx{../src/task rc:denotate.rc rrr 2>&1}; like ($output, qr/one.+\d{1,2}\/\d{1,2}\/\d{4} Bert/ms, 'Delete partial match - Bert'); like ($output, qr/Bert.+\d{1,2}\/\d{1,2}\/\d{4} Kermit the frog/ms, 'Delete partial match - Kermit the frog'); # 25 unlike ($output, qr/frog.+\d{1,2}\/\d{1,2}\/\d{4} Kermit and Miss Piggy/ms, 'Delete partial match - Kermit and Miss Piggy'); diff --git a/test/dependencies.t b/test/dependencies.t index f071d89ed..3f4d23155 100755 --- a/test/dependencies.t +++ b/test/dependencies.t @@ -45,8 +45,8 @@ if (open my $fh, '>', 'dep.rc') ok (-r 'dep.rc', 'Created dep.rc'); } -qx{../src/task rc:dep.rc add One}; -qx{../src/task rc:dep.rc add Two}; +qx{../src/task rc:dep.rc add One 2>&1}; +qx{../src/task rc:dep.rc add Two 2>&1}; # [2] my $output = qx{../src/task rc:dep.rc 1 modify dep:-2 2>&1 >/dev/null}; @@ -61,12 +61,12 @@ $output = qx{../src/task rc:dep.rc 99 modify dep:1 2>&1 >/dev/null}; like ($output, qr/No tasks specified\./, 'dependencies - add dependency to nonexistent task'); # [5,6] t 1 dep:2; t info 1 => blocked by 2 -$output = qx{../src/task rc:dep.rc 1 modify dep:2; ../src/task rc:dep.rc info 1}; +$output = qx{../src/task rc:dep.rc 1 modify dep:2 2>&1; ../src/task rc:dep.rc info 1 2>&1}; like ($output, qr/This task blocked by\s+2 Two\nUUID/, 'dependencies - trivial blocked'); unlike ($output, qr/This task is blocking\n/, 'dependencies - trivial blocked'); # [7,8] t info 2 => blocking 1 -$output = qx{../src/task rc:dep.rc info 2}; +$output = qx{../src/task rc:dep.rc info 2 2>&1}; unlike ($output, qr/This task blocked by/, 'dependencies - trivial blocking'); like ($output, qr/This task is blocking\s+1 One\nUUID/, 'dependencies - trivial blocking'); @@ -85,10 +85,10 @@ like ($output, qr/Circular dependency detected and disallowed\./, 'dependencie unlike ($output, qr/Modified 1 task\./, 'dependencies - trivial circular'); # [14,15] t 1 dep:2; t 2 dep:3; t 1 dep:3 => not circular -qx{../src/task rc:dep.rc 1 modify dep:2}; -qx{../src/task rc:dep.rc add Three}; -qx{../src/task rc:dep.rc 2 modify dep:3}; -$output = qx{../src/task rc:dep.rc 1 modify dep:3}; +qx{../src/task rc:dep.rc 1 modify dep:2 2>&1}; +qx{../src/task rc:dep.rc add Three 2>&1}; +qx{../src/task rc:dep.rc 2 modify dep:3 2>&1}; +$output = qx{../src/task rc:dep.rc 1 modify dep:3 2>&1}; unlike ($output, qr/Circular dependency detected and disallowed\./, 'dependencies - diamond, non-circular'); like ($output, qr/Modified 1 task\./, 'dependencies - diamond, non-circular'); @@ -96,13 +96,13 @@ like ($output, qr/Modified 1 task\./, 'dependencie unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data for a fresh start'); -qx{../src/task rc:dep.rc add One}; -qx{../src/task rc:dep.rc add Two}; -qx{../src/task rc:dep.rc add Three}; -qx{../src/task rc:dep.rc add Four}; -qx{../src/task rc:dep.rc add Five}; +qx{../src/task rc:dep.rc add One 2>&1}; +qx{../src/task rc:dep.rc add Two 2>&1}; +qx{../src/task rc:dep.rc add Three 2>&1}; +qx{../src/task rc:dep.rc add Four 2>&1}; +qx{../src/task rc:dep.rc add Five 2>&1}; -qx{../src/task rc:dep.rc 5 modify dep:4; ../src/task rc:dep.rc 4 modify dep:3; ../src/task rc:dep.rc 3 modify dep:2; ../src/task rc:dep.rc 2 modify dep:1}; +qx{../src/task rc:dep.rc 5 modify dep:4 2>&1; ../src/task rc:dep.rc 4 modify dep:3 2>&1; ../src/task rc:dep.rc 3 modify dep:2 2>&1; ../src/task rc:dep.rc 2 modify dep:1 2>&1}; # [17,18] 5 dep 4 dep 3 dep 2 dep 1 dep 5 => error $output = qx{../src/task rc:dep.rc 1 modify dep:5 2>&1 >/dev/null}; @@ -113,108 +113,108 @@ unlike ($output, qr/Modified 1 task\./, 'dependencie unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data for a fresh start'); -qx{../src/task rc:dep.rc add One}; -qx{../src/task rc:dep.rc add Two}; -qx{../src/task rc:dep.rc add Three}; -qx{../src/task rc:dep.rc add Four}; -qx{../src/task rc:dep.rc add Five}; -qx{../src/task rc:dep.rc add Six recurring due:tomorrow recur:daily}; +qx{../src/task rc:dep.rc add One 2>&1}; +qx{../src/task rc:dep.rc add Two 2>&1}; +qx{../src/task rc:dep.rc add Three 2>&1}; +qx{../src/task rc:dep.rc add Four 2>&1}; +qx{../src/task rc:dep.rc add Five 2>&1}; +qx{../src/task rc:dep.rc add Six recurring due:tomorrow recur:daily 2>&1}; # [20] -qx{../src/task rc:dep.rc ls}; # To force handleRecurrence call. -$output = qx{echo 'y' | ../src/task rc:dep.rc 6 modify dep:5}; +qx{../src/task rc:dep.rc ls 2>&1}; # To force handleRecurrence call. +$output = qx{echo 'y' | ../src/task rc:dep.rc 6 modify dep:5 2>&1}; like ($output, qr/Modified \d+ task/, 'dependencies - recurring task depending on another task'); # [21] -$output = qx{../src/task rc:dep.rc 4 modify dep:5}; +$output = qx{../src/task rc:dep.rc 4 modify dep:5 2>&1}; like ($output, qr/Modified \d+ task/, 'dependencies - task depending on recurring task'); # [22] t 1 dep:2,3,4; t 1 dep:-2,-4,5; t info 1 => blocked by 3,5 -$output = qx{../src/task rc:dep.rc 1 modify dep:2,3,4; ../src/task rc:dep.rc 1 modify dep:-2,-4,5; ../src/task rc:dep.rc info 1}; +$output = qx{../src/task rc:dep.rc 1 modify dep:2,3,4 2>&1; ../src/task rc:dep.rc 1 modify dep:-2,-4,5 2>&1; ../src/task rc:dep.rc info 1 2>&1}; like ($output, qr/This task blocked by\s+3 Three\n\s+5 Five\nUUID/, 'dependencies - multiple dependencies modified'); # [23,24] -$output = qx{../src/task rc:dep.rc 3,5 do; ../src/task rc:dep.rc info 1}; +$output = qx{../src/task rc:dep.rc 3,5 do 2>&1; ../src/task rc:dep.rc info 1 2>&1}; unlike ($output, qr/This task blocked by/, 'dependencies - task info reflects completed dependencies'); unlike ($output, qr/This task is blocking/, 'dependencies - task info reflects completed dependencies'); # [25] -$output = qx{../src/task rc:dep.rc depreport}; +$output = qx{../src/task rc:dep.rc depreport 2>&1}; like ($output, qr/\s1\s+One\s+/, 'dependencies - depends report column reflects completed dependencies'); # [26] unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data for a fresh start'); -qx{../src/task rc:dep.rc add One}; -qx{../src/task rc:dep.rc add Two}; -qx{../src/task rc:dep.rc add Three}; -qx{../src/task rc:dep.rc add Four}; +qx{../src/task rc:dep.rc add One 2>&1}; +qx{../src/task rc:dep.rc add Two 2>&1}; +qx{../src/task rc:dep.rc add Three 2>&1}; +qx{../src/task rc:dep.rc add Four 2>&1}; -qx{../src/task rc:dep.rc 1 modify dep:3,4}; -qx{../src/task rc:dep.rc 2 do}; +qx{../src/task rc:dep.rc 1 modify dep:3,4 2>&1}; +qx{../src/task rc:dep.rc 2 do 2>&1}; # [27] -$output = qx{../src/task rc:dep.rc depreport}; +$output = qx{../src/task rc:dep.rc depreport 2>&1}; like ($output, qr/\s1\s+2 3\s+One\s+/, 'dependencies - depends report column reflects changed IDs'); # [28] -qx{../src/task rc:dep.rc 3 do}; -$output = qx{../src/task rc:dep.rc depreport}; +qx{../src/task rc:dep.rc 3 do 2>&1}; +$output = qx{../src/task rc:dep.rc depreport 2>&1}; like ($output, qr/\s1\s+2\s+One\s+/, 'dependencies - depends report column reflects completed dependencies'); # [29] unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data for a fresh start'); -qx{../src/task rc:dep.rc add One}; -qx{../src/task rc:dep.rc add Two}; -qx{../src/task rc:dep.rc add Three}; -qx{../src/task rc:dep.rc add Four}; +qx{../src/task rc:dep.rc add One 2>&1}; +qx{../src/task rc:dep.rc add Two 2>&1}; +qx{../src/task rc:dep.rc add Three 2>&1}; +qx{../src/task rc:dep.rc add Four 2>&1}; -qx{../src/task rc:dep.rc 2 modify dep:1; ../src/task rc:dep.rc 3 modify dep:2; ../src/task rc:dep.rc 4 modify dep:3}; +qx{../src/task rc:dep.rc 2 modify dep:1 2>&1; ../src/task rc:dep.rc 3 modify dep:2 2>&1; ../src/task rc:dep.rc 4 modify dep:3 2>&1}; # [30,31] -$output = qx{echo 'y' | ../src/task rc:dep.rc 2 do}; +$output = qx{echo 'y' | ../src/task rc:dep.rc 2 do 2>&1}; like ($output, qr/fixed/, 'dependencies - user prompted to fix broken chain after completing a blocked task'); like ($output, qr/is blocked by/, 'dependencies - user nagged for completing a blocked task'); # [32] -$output = qx{echo 'y' | ../src/task rc:dep.rc 1 do}; +$output = qx{echo 'y' | ../src/task rc:dep.rc 1 do 2>&1}; unlike ($output, qr/fixed/, 'dependencies - user not prompted to fix broken chain when the head of the chain is marked as complete'); # [33] -$output = qx{echo 'y' | ../src/task rc:dep.rc 4 del}; +$output = qx{echo 'y' | ../src/task rc:dep.rc 4 del 2>&1}; unlike ($output, qr/fixed/, 'dependencies - user not prompted to fix broken chain when the tail of the chain is deleted'); # [34] unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data for a fresh start'); -qx{../src/task rc:dep.rc add One}; -qx{../src/task rc:dep.rc add Two}; -qx{../src/task rc:dep.rc add Three}; -qx{../src/task rc:dep.rc add Four}; -qx{../src/task rc:dep.rc add Five}; +qx{../src/task rc:dep.rc add One 2>&1}; +qx{../src/task rc:dep.rc add Two 2>&1}; +qx{../src/task rc:dep.rc add Three 2>&1}; +qx{../src/task rc:dep.rc add Four 2>&1}; +qx{../src/task rc:dep.rc add Five 2>&1}; -qx{../src/task rc:dep.rc 2 modify dep:1}; -qx{../src/task rc:dep.rc 3 modify dep:2}; -qx{../src/task rc:dep.rc 4 modify dep:3}; -qx{../src/task rc:dep.rc 5 modify dep:4}; +qx{../src/task rc:dep.rc 2 modify dep:1 2>&1}; +qx{../src/task rc:dep.rc 3 modify dep:2 2>&1}; +qx{../src/task rc:dep.rc 4 modify dep:3 2>&1}; +qx{../src/task rc:dep.rc 5 modify dep:4 2>&1}; # [35] -qx{echo 'y' | ../src/task rc:dep.rc 2 do}; -$output = qx{../src/task rc:dep.rc depreport}; +qx{echo 'y' | ../src/task rc:dep.rc 2 do 2>&1}; +$output = qx{../src/task rc:dep.rc depreport 2>&1}; like ($output, qr/\s1\s+One\s*\n\s2\s+1\s+Three\s*\n\s3\s+2\s+Four\s*\n\s4\s+3\s+Five/, 'dependencies - fixed chain after completing a blocked task'); # [36] -qx{echo "Y\nY\n" | ../src/task rc:dep.rc 2 del}; -$output = qx{../src/task rc:dep.rc depreport}; +qx{echo "Y\nY\n" | ../src/task rc:dep.rc 2 del 2>&1}; +$output = qx{../src/task rc:dep.rc depreport 2>&1}; like ($output, qr/\s1\s+One\s*\n\s2\s+1\s+Four\s*\n\s3\s+2\s+Five/, 'dependencies - fixed chain after deleting a blocked task'); # [37] -qx{../src/task rc:dep.rc 2 modify dep:-1}; -$output = qx{../src/task rc:dep.rc depreport}; +qx{../src/task rc:dep.rc 2 modify dep:-1 2>&1}; +$output = qx{../src/task rc:dep.rc depreport 2>&1}; like ($output, qr/\s1\s+One\s*\n\s2\s+Four\s*\n\s3\s+2\s+Five/, 'dependencies - chain should not be automatically repaired after manually removing a dependency'); # [38] @@ -224,17 +224,17 @@ ok (!-r 'pending.data', 'Removed pending.data for a fresh start'); # Bug when adding a range of dependencies - 'task 3 mod dep:1-2' interprets the # range 1-2 as the id 1 -qx{../src/task rc:dep.rc add test1}; -qx{../src/task rc:dep.rc add test2}; -qx{../src/task rc:dep.rc add test3}; -qx{../src/task rc:dep.rc add test4}; -qx{../src/task rc:dep.rc add test5}; -my $output = qx{../src/task rc:dep.rc 5 info}; +qx{../src/task rc:dep.rc add test1 2>&1}; +qx{../src/task rc:dep.rc add test2 2>&1}; +qx{../src/task rc:dep.rc add test3 2>&1}; +qx{../src/task rc:dep.rc add test4 2>&1}; +qx{../src/task rc:dep.rc add test5 2>&1}; +$output = qx{../src/task rc:dep.rc 5 info 2>&1}; my ($uuid) = $output =~ /UUID\s+(\S+)/; # [39-43] test a comma-separated list of IDs, UUIDs, and ID ranges for creation -qx{../src/task rc:dep.rc add test6 dep:1-3,4,$uuid}; -$output = qx{../src/task rc:dep.rc 6 info}; +qx{../src/task rc:dep.rc add test6 dep:1-3,4,$uuid 2>&1}; +$output = qx{../src/task rc:dep.rc 6 info 2>&1}; like ($output, qr/test1/ms, 'Dependency appearing for task1'); like ($output, qr/test2/ms, 'Dependency appearing for task2'); like ($output, qr/test3/ms, 'Dependency appearing for task3'); @@ -242,8 +242,8 @@ like ($output, qr/test4/ms, 'Dependency appearing for task4'); like ($output, qr/test5/ms, 'Dependency appearing for task5'); # [44-48] test a comma-separated list of IDs, UUIDs, and ID ranges for deletion -qx{../src/task rc:dep.rc 6 mod dep:-1-3,-4,-$uuid}; -$output = qx{../src/task rc:dep.rc 6 info}; +qx{../src/task rc:dep.rc 6 mod dep:-1-3,-4,-$uuid 2>&1}; +$output = qx{../src/task rc:dep.rc 6 info 2>&1}; unlike ($output, qr/test1/ms, 'Dependency not appearing for task1'); unlike ($output, qr/test2/ms, 'Dependency not appearing for task2'); unlike ($output, qr/test3/ms, 'Dependency not appearing for task3'); diff --git a/test/dom.2.t b/test/dom.2.t index d9c6711cc..92c3f2ec0 100755 --- a/test/dom.2.t +++ b/test/dom.2.t @@ -41,14 +41,14 @@ if (open my $fh, '>', 'dom.rc') } # DOM reference to other task. -qx{../src/task rc:dom.rc add one due:20110901}; -qx{../src/task rc:dom.rc add two due:1.due}; -my $output = qx{../src/task rc:dom.rc 2 info}; +qx{../src/task rc:dom.rc add one due:20110901 2>&1}; +qx{../src/task rc:dom.rc add two due:1.due 2>&1}; +my $output = qx{../src/task rc:dom.rc 2 info 2>&1}; like ($output, qr/Due\s+20110901/, 'Found due date duplicated via dom'); # DOM reference to the current task. -qx{../src/task rc:dom.rc add three due:20110901 wait:due}; -$output = qx{../src/task rc:dom.rc 3 info}; +qx{../src/task rc:dom.rc add three due:20110901 wait:due 2>&1}; +$output = qx{../src/task rc:dom.rc 3 info 2>&1}; like ($output, qr/Waiting until\s+20110901/, 'Found wait date duplicated from due date'); # Cleanup. diff --git a/test/due.t b/test/due.t index d8f4dc578..3d3017afa 100755 --- a/test/due.t +++ b/test/due.t @@ -51,17 +51,17 @@ my $just = sprintf ("%d/%d/%d", $m + 1, $d, $y + 1900); ($d, $m, $y) = (localtime (time + 5 * 86_400))[3..5]; my $almost = sprintf ("%d/%d/%d", $m + 1, $d, $y + 1900); -qx{../src/task rc:due.rc add one due:$just}; -qx{../src/task rc:due.rc add two due:$almost}; -my $output = qx{../src/task rc:due.rc list}; +qx{../src/task rc:due.rc add one due:$just 2>&1}; +qx{../src/task rc:due.rc add two due:$almost 2>&1}; +my $output = qx{../src/task rc:due.rc list 2>&1}; like ($output, qr/\[31m.+$just.+\[0m/, 'one marked due'); like ($output, qr/\s+$almost\s+/, 'two not marked due'); -qx{../src/task rc:due.rc add three due:today}; -$output = qx{../src/task rc:due.rc list due:today}; +qx{../src/task rc:due.rc add three due:today 2>&1}; +$output = qx{../src/task rc:due.rc list due:today 2>&1}; like ($output, qr/three/, 'due:today works as a filter'); -$output = qx{../src/task rc:due.rc list due.is:today}; +$output = qx{../src/task rc:due.rc list due.is:today 2>&1}; like ($output, qr/three/, 'due.is:today works as a filter'); # Cleanup. diff --git a/test/duplicate.t b/test/duplicate.t index 567f33369..e0ce9c8a8 100755 --- a/test/duplicate.t +++ b/test/duplicate.t @@ -39,16 +39,16 @@ if (open my $fh, '>', 'dup.rc') } # Test the duplicate command. -qx{../src/task rc:dup.rc add foo}; -qx{../src/task rc:dup.rc 1 duplicate}; -my $output = qx{../src/task rc:dup.rc info 2}; +qx{../src/task rc:dup.rc add foo 2>&1}; +qx{../src/task rc:dup.rc 1 duplicate 2>&1}; +my $output = qx{../src/task rc:dup.rc info 2 2>&1}; like ($output, qr/ID\s+2/, 'duplicate new id'); like ($output, qr/Status\s+Pending/, 'duplicate same status'); like ($output, qr/Description\s+foo/, 'duplicate same description'); # Test the en passant modification while duplicating. -qx{../src/task rc:dup.rc 1 duplicate priority:H /foo/FOO/ +tag}; -$output = qx{../src/task rc:dup.rc info 3}; +qx{../src/task rc:dup.rc 1 duplicate priority:H /foo/FOO/ +tag 2>&1}; +$output = qx{../src/task rc:dup.rc info 3 2>&1}; like ($output, qr/ID\s+3/, 'duplicate new id'); like ($output, qr/Status\s+Pending/, 'duplicate same status'); like ($output, qr/Description\s+FOO/, 'duplicate modified description'); @@ -56,7 +56,7 @@ 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{../src/task rc:dup.rc 1 duplicate}; +$output = qx{../src/task rc:dup.rc 1 duplicate 2>&1}; like ($output, qr/Duplicated\stask\s1\s'foo'/, 'duplicate output task id and description'); like ($output, qr/Created\s+task\s+4/, 'duplicate output of new task id'); diff --git a/test/duplicate2.t b/test/duplicate2.t index 1c1e738f9..205efd7cd 100755 --- a/test/duplicate2.t +++ b/test/duplicate2.t @@ -39,35 +39,35 @@ if (open my $fh, '>', 'dup.rc') } # Add a recurring task. Duplicate both parent and child. -qx{../src/task rc:dup.rc add R due:tomorrow recur:weekly}; -qx{../src/task rc:dup.rc list}; # To force handleRecurrence. -my $output = qx{../src/task rc:dup.rc 1 info}; +qx{../src/task rc:dup.rc add R due:tomorrow recur:weekly 2>&1}; +qx{../src/task rc:dup.rc list 2>&1}; # To force handleRecurrence. +my $output = qx{../src/task rc:dup.rc 1 info 2>&1}; like ($output, qr/Status\s+Recurring/, 'Found parent'); -$output = qx{../src/task rc:dup.rc 2 info}; +$output = qx{../src/task rc:dup.rc 2 info 2>&1}; like ($output, qr/Status\s+Pending/, 'Found child'); -$output = qx{../src/task rc:dup.rc 1 duplicate}; +$output = qx{../src/task rc:dup.rc 1 duplicate 2>&1}; like ($output, qr/The duplicated task is too/, 'Duplicated parent is also a parent'); -$output = qx{../src/task rc:dup.rc 2 duplicate}; +$output = qx{../src/task rc:dup.rc 2 duplicate 2>&1}; like ($output, qr/The duplicated task is not/, 'Duplicated child is also a plain task'); -qx{../src/task rc:dup.rc list}; # To force handleRecurrence. -$output = qx{../src/task rc:dup.rc 1 info}; +qx{../src/task rc:dup.rc list 2>&1}; # To force handleRecurrence. +$output = qx{../src/task rc:dup.rc 1 info 2>&1}; like ($output, qr/Status\s+Recurring/, 'Found original parent task'); -$output = qx{../src/task rc:dup.rc 2 info}; +$output = qx{../src/task rc:dup.rc 2 info 2>&1}; like ($output, qr/Status\s+Pending/, 'Found original child task - pending'); like ($output, qr/Parent/, 'Found original child task - with parent'); -$output = qx{../src/task rc:dup.rc 3 info}; +$output = qx{../src/task rc:dup.rc 3 info 2>&1}; like ($output, qr/Status\s+Recurring/, 'Found duplicated parent task'); -$output = qx{../src/task rc:dup.rc 4 info}; +$output = qx{../src/task rc:dup.rc 4 info 2>&1}; like ($output, qr/Status\s+Pending/, 'Found duplicated plain task'); unlike ($output, qr/Parent/, 'Found duplicated child task - no parent'); -$output = qx{../src/task rc:dup.rc 5 info}; +$output = qx{../src/task rc:dup.rc 5 info 2>&1}; like ($output, qr/Status\s+Pending/, 'Found duplicated child task'); like ($output, qr/Parent/, 'Found duplicated child task - with parent'); diff --git a/test/enpassant.t b/test/enpassant.t index 387c94a23..957e67a09 100755 --- a/test/enpassant.t +++ b/test/enpassant.t @@ -39,15 +39,15 @@ if (open my $fh, '>', 'enp.rc') } # Test the en passant feature. -qx{../src/task rc:enp.rc add foo}; -qx{../src/task rc:enp.rc add foo bar}; -qx{../src/task rc:enp.rc 1,2 do /foo/FOO/ pri:H +tag}; -my $output = qx{../src/task rc:enp.rc info 1}; +qx{../src/task rc:enp.rc add foo 2>&1}; +qx{../src/task rc:enp.rc add foo bar 2>&1}; +qx{../src/task rc:enp.rc 1,2 do /foo/FOO/ pri:H +tag 2>&1}; +my $output = qx{../src/task rc:enp.rc info 1 2>&1}; like ($output, qr/Status\s+Completed/, 'en passant 1 status change'); like ($output, qr/Description\s+FOO/, 'en passant 1 description change'); like ($output, qr/Priority\s+H/, 'en passant 1 description change'); like ($output, qr/Tags\s+tag/, 'en passant 1 description change'); -$output = qx{../src/task rc:enp.rc info 2}; +$output = qx{../src/task rc:enp.rc info 2 2>&1}; like ($output, qr/Status\s+Completed/, 'en passant 2 status change'); like ($output, qr/Description\s+FOO bar/, 'en passant 2 description change'); like ($output, qr/Priority\s+H/, 'en passant 2 description change'); diff --git a/test/export.yaml.t b/test/export.yaml.t index 649adf747..b6108a263 100755 --- a/test/export.yaml.t +++ b/test/export.yaml.t @@ -41,10 +41,10 @@ if (open my $fh, '>', 'export.rc') # Add two tasks, export, examine result. # TODO Add annotations. -qx{../src/task rc:export.rc add priority:H project:A one}; -qx{../src/task rc:export.rc add +tag1 +tag2 two}; +qx{../src/task rc:export.rc add priority:H project:A one 2>&1}; +qx{../src/task rc:export.rc add +tag1 +tag2 two 2>&1}; -my $output = qx{../src/task rc:export.rc export | ../scripts/add-ons/export-yaml.pl > ./export.txt}; +my $output = qx{../src/task rc:export.rc export | ../scripts/add-ons/export-yaml.pl > ./export.txt 2>&1}; my @lines; if (open my $fh, '<', './export.txt') { diff --git a/test/feature.559.t b/test/feature.559.t index 19337d584..09094048a 100755 --- a/test/feature.559.t +++ b/test/feature.559.t @@ -41,7 +41,7 @@ if (open my $fh, '>', 'bug.rc') } # Feature 559: rc.exit.on.missing.db should cause exit if rc.data.location is missing. -qx{../src/task rc:bug.rc add foo rc.debug:1}; +qx{../src/task rc:bug.rc add foo rc.debug:1 2>&1}; my $output = qx{../src/task rc:bug.rc list 2>&1 >/dev/null}; unlike ($output, qr/Error.+does not exist/, 'No error on existant rc.data.location'); diff --git a/test/feature.608.t b/test/feature.608.t index 135fb3d61..f466cd1c7 100755 --- a/test/feature.608.t +++ b/test/feature.608.t @@ -42,13 +42,13 @@ if (open my $fh, '>', 'bug.rc') # Feature 608: Done should stop a task # Setup: Add and start a task -qx{../src/task rc:bug.rc add Test due:3d; ../src/task rc:bug.rc 1 start}; +qx{../src/task rc:bug.rc add Test due:3d 2>&1; ../src/task rc:bug.rc 1 start 2>&1}; # Mark the task as completed -qx{../src/task rc:bug.rc 1 done}; +qx{../src/task rc:bug.rc 1 done 2>&1}; # Check to ensure task was stopped -my $output = qx{../src/task rc:bug.rc info 1}; +my $output = qx{../src/task rc:bug.rc info 1 2>&1}; like ($output, qr/End set to/ms, 'Done command also stops started task.'); # Cleanup. diff --git a/test/feature.632.t b/test/feature.632.t index 52572bb78..96c04b211 100755 --- a/test/feature.632.t +++ b/test/feature.632.t @@ -47,37 +47,37 @@ if (open my $fh, '>', 'rc2') } # Feature #632: task environment variables: TASKRC and TASKDATA -qx{../src/task rc:rc1 add one}; -qx{../src/task rc:rc2 add two}; +qx{../src/task rc:rc1 add one 2>&1}; +qx{../src/task rc:rc2 add two 2>&1}; # All in agreement: 1 -my $output = qx{../src/task rc:rc1 list}; +my $output = qx{../src/task rc:rc1 list 2>&1}; like ($output, qr/one/, 'rc1'); -$output = qx{TASKDATA=./data1 ../src/task rc:rc1 list}; +$output = qx{TASKDATA=./data1 ../src/task rc:rc1 list 2>&1}; like ($output, qr/one/, 'TASKDATA, rc1'); -$output = qx{TASKRC=./rc1 ../src/task list}; +$output = qx{TASKRC=./rc1 ../src/task list 2>&1}; like ($output, qr/one/, 'TASKRC'); -$output = qx{TASKDATA=./data1 TASKRC=./rc1 ../src/task list}; +$output = qx{TASKDATA=./data1 TASKRC=./rc1 ../src/task list 2>&1}; like ($output, qr/one/, 'TASKDATA, TASKRC, rc1'); # All in agreement: 2 -$output = qx{../src/task rc:rc2 list}; +$output = qx{../src/task rc:rc2 list 2>&1}; like ($output, qr/two/, 'rc2'); -$output = qx{TASKDATA=./data2 ../src/task rc:rc2 list}; +$output = qx{TASKDATA=./data2 ../src/task rc:rc2 list 2>&1}; like ($output, qr/two/, 'TASKDATA, rc2'); -$output = qx{TASKRC=./rc2 ../src/task list}; +$output = qx{TASKRC=./rc2 ../src/task list 2>&1}; like ($output, qr/two/, 'TASKRC'); -$output = qx{TASKDATA=./data2 TASKRC=./rc2 ../src/task list}; +$output = qx{TASKDATA=./data2 TASKRC=./rc2 ../src/task list 2>&1}; like ($output, qr/two/, 'TASKDATA, TASKRC, rc2'); # rc: overrides TASKRC, TASKDATA -$output = qx{TASKDATA=./data1 TASKRC=./rc1 ../src/task rc:rc2 list}; +$output = qx{TASKDATA=./data1 TASKRC=./rc1 ../src/task rc:rc2 list 2>&1}; like ($output, qr/one/, 'overrides TASKDATA, TASKRC override rc:'); rmtree ('./data1', 0 , 1); diff --git a/test/feature.725.t b/test/feature.725.t index 5e4b1bc7f..f0342ee44 100755 --- a/test/feature.725.t +++ b/test/feature.725.t @@ -40,27 +40,27 @@ if (open my $fh, '>', 'feature.rc') } # Feature 725: Feedback when tasks become unblocked. -qx{../src/task rc:feature.rc add one}; -qx{../src/task rc:feature.rc add two}; -qx{../src/task rc:feature.rc add three}; -qx{../src/task rc:feature.rc add four}; -qx{../src/task rc:feature.rc 1 modify depends:2,3}; -qx{../src/task rc:feature.rc 4 modify depends:1}; -my $output = qx{../src/task rc:feature.rc long}; +qx{../src/task rc:feature.rc add one 2>&1}; +qx{../src/task rc:feature.rc add two 2>&1}; +qx{../src/task rc:feature.rc add three 2>&1}; +qx{../src/task rc:feature.rc add four 2>&1}; +qx{../src/task rc:feature.rc 1 modify depends:2,3 2>&1}; +qx{../src/task rc:feature.rc 4 modify depends:1 2>&1}; +my $output = qx{../src/task rc:feature.rc long 2>&1}; like ($output, qr/1.+2\s3/, 'Dependencies in place [1]'); like ($output, qr/4.+1/, 'Dependencies in place [4]'); # Trigger the feedback based on completion. -$output = qx{../src/task rc:feature.rc 2 done}; +$output = qx{../src/task rc:feature.rc 2 done 2>&1}; unlike ($output, qr/Unblocked/, 'Completing first dependency does not trigger message'); -$output = qx{../src/task rc:feature.rc 3 done}; +$output = qx{../src/task rc:feature.rc 3 done 2>&1}; like ($output, qr/Unblocked/, 'Completing second dependency triggers message'); # Now trigger the feedback based on deletion. -$output = qx{../src/task rc:feature.rc long}; +$output = qx{../src/task rc:feature.rc long 2>&1}; like ($output, qr/2.+1/, 'Dependencies in place [2]'); -$output = qx{../src/task rc:feature.rc 1 delete}; +$output = qx{../src/task rc:feature.rc 1 delete 2>&1}; like ($output, qr/Unblocked/, 'Deleting dependency triggers message'); # Cleanup. diff --git a/test/feature.891.t b/test/feature.891.t index ecb7af361..bc27c8508 100755 --- a/test/feature.891.t +++ b/test/feature.891.t @@ -39,144 +39,144 @@ if (open my $fh, '>', 'bug.rc') } # Feature 891: UUID filter should be uuid.endswith by default -qx{../src/task rc:bug.rc add one}; -qx{../src/task rc:bug.rc add two}; -my $output = qx{../src/task rc:bug.rc 1 info}; +qx{../src/task rc:bug.rc add one 2>&1}; +qx{../src/task rc:bug.rc add two 2>&1}; +my $output = qx{../src/task rc:bug.rc 1 info 2>&1}; my ($uuid) = $output =~ /UUID\s+(\S{36})/ms; -$output = qx{../src/task rc:bug.rc $uuid list rc.debug:1}; +$output = qx{../src/task rc:bug.rc $uuid list rc.debug:1 2>&1}; like ($output, qr/one/, "Found with $uuid"); my ($short) = $uuid =~ /^(.{35})/; -$output = qx{../src/task rc:bug.rc $short list rc.debug:1}; +$output = qx{../src/task rc:bug.rc $short list rc.debug:1 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{34})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{33})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{32})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{31})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{30})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{29})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{28})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{27})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{26})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{25})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{24})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{23})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{22})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{21})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{20})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{19})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{18})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{17})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{16})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{15})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{14})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{13})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{12})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{11})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{10})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{9})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; like ($output, qr/one/, "Found with $short"); ($short) = $uuid =~ /^(.{8})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; unlike ($output, qr/one/, "Not found with $short"); ($short) = $uuid =~ /^(.{7})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; unlike ($output, qr/one/, "Not found with $short"); ($short) = $uuid =~ /^(.{6})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; unlike ($output, qr/one/, "Not found with $short"); ($short) = $uuid =~ /^(.{5})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; unlike ($output, qr/one/, "Not found with $short"); ($short) = $uuid =~ /^(.{4})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; unlike ($output, qr/one/, "Not found with $short"); ($short) = $uuid =~ /^(.{3})/; -$output = qx{../src/task rc:bug.rc $short list}; +$output = qx{../src/task rc:bug.rc $short list 2>&1}; unlike ($output, qr/one/, "Not found with $short"); # Cleanup. diff --git a/test/feature.exit.t b/test/feature.exit.t index b8f84b50b..214731d32 100755 --- a/test/feature.exit.t +++ b/test/feature.exit.t @@ -39,10 +39,10 @@ if (open my $fh, '>', 'exit.rc') ok (-r 'exit.rc', 'Created exit.rc'); } -qx{../src/task rc:exit.rc add foo}; -my $exit_good = system ('../src/task rc:exit.rc ls foo 2>&1 >>/dev/null'); +qx{../src/task rc:exit.rc add foo 2>&1}; +my $exit_good = system ('../src/task rc:exit.rc ls foo >/dev/null 2>&1'); is ($exit_good, 0, 'task returns 0 on success'); -my $exit_bad = system ('../src/task rc:exit.rc ls bar 2>&1 >>/dev/null'); +my $exit_bad = system ('../src/task rc:exit.rc ls bar >/dev/null 2>&1'); isnt ($exit_bad, 0, 'task returns non-zero on failure'); # Cleanup. diff --git a/test/filter-prefix.t b/test/filter-prefix.t index 027996376..0ed084210 100755 --- a/test/filter-prefix.t +++ b/test/filter-prefix.t @@ -39,16 +39,16 @@ if (open my $fh, '>', 'filter.rc') } # Test the filters. -qx{../src/task rc:filter.rc add project:foo.uno priority:H +tag one foo}; -qx{../src/task rc:filter.rc add project:foo.dos priority:H two}; -qx{../src/task rc:filter.rc add project:foo.tres three}; -qx{../src/task rc:filter.rc add project:bar.uno priority:H four}; -qx{../src/task rc:filter.rc add project:bar.dos +tag five}; -qx{../src/task rc:filter.rc add project:bar.tres six foo}; -qx{../src/task rc:filter.rc add project:bazuno seven bar foo}; -qx{../src/task rc:filter.rc add project:bazdos eight bar foo}; +qx{../src/task rc:filter.rc add project:foo.uno priority:H +tag one foo 2>&1}; +qx{../src/task rc:filter.rc add project:foo.dos priority:H two 2>&1}; +qx{../src/task rc:filter.rc add project:foo.tres three 2>&1}; +qx{../src/task rc:filter.rc add project:bar.uno priority:H four 2>&1}; +qx{../src/task rc:filter.rc add project:bar.dos +tag five 2>&1}; +qx{../src/task rc:filter.rc add project:bar.tres six foo 2>&1}; +qx{../src/task rc:filter.rc add project:bazuno seven bar foo 2>&1}; +qx{../src/task rc:filter.rc add project:bazdos eight bar foo 2>&1}; -my $output = qx{../src/task rc:filter.rc list}; +my $output = qx{../src/task rc:filter.rc list 2>&1}; like ($output, qr/one/, 'a1'); like ($output, qr/two/, 'a2'); like ($output, qr/three/, 'a3'); @@ -58,7 +58,7 @@ like ($output, qr/six/, 'a6'); like ($output, qr/seven/, 'a7'); like ($output, qr/eight/, 'a8'); -$output = qx{../src/task rc:filter.rc list project:foo}; +$output = qx{../src/task rc:filter.rc list project:foo 2>&1}; like ($output, qr/one/, 'b1'); like ($output, qr/two/, 'b2'); like ($output, qr/three/, 'b3'); @@ -68,7 +68,7 @@ unlike ($output, qr/six/, 'b6'); unlike ($output, qr/seven/, 'b7'); unlike ($output, qr/eight/, 'b8'); -$output = qx{../src/task rc:filter.rc list project.not:foo}; +$output = qx{../src/task rc:filter.rc list project.not:foo 2>&1}; unlike ($output, qr/one/, 'c1'); unlike ($output, qr/two/, 'c2'); unlike ($output, qr/three/, 'c3'); @@ -78,7 +78,7 @@ like ($output, qr/six/, 'c6'); like ($output, qr/seven/, 'c7'); like ($output, qr/eight/, 'c8'); -$output = qx{../src/task rc:filter.rc list project.startswith:bar}; +$output = qx{../src/task rc:filter.rc list project.startswith:bar 2>&1}; unlike ($output, qr/one/, 'd1'); unlike ($output, qr/two/, 'd2'); unlike ($output, qr/three/, 'd3'); @@ -88,7 +88,7 @@ like ($output, qr/six/, 'd6'); unlike ($output, qr/seven/, 'd7'); unlike ($output, qr/eight/, 'd8'); -$output = qx{../src/task rc:filter.rc list project:ba}; +$output = qx{../src/task rc:filter.rc list project:ba 2>&1}; unlike ($output, qr/one/, 'f1'); unlike ($output, qr/two/, 'f2'); unlike ($output, qr/three/, 'f3'); @@ -98,7 +98,7 @@ like ($output, qr/six/, 'f6'); like ($output, qr/seven/, 'f7'); like ($output, qr/eight/, 'f8'); -$output = qx{../src/task rc:filter.rc list project.not:ba}; +$output = qx{../src/task rc:filter.rc list project.not:ba 2>&1}; like ($output, qr/one/, 'g1'); like ($output, qr/two/, 'g2'); like ($output, qr/three/, 'g3'); @@ -108,7 +108,7 @@ unlike ($output, qr/six/, 'g6'); unlike ($output, qr/seven/, 'g7'); unlike ($output, qr/eight/, 'g8'); -$output = qx{../src/task rc:filter.rc list description.has:foo}; +$output = qx{../src/task rc:filter.rc list description.has:foo 2>&1}; like ($output, qr/one/, 'i1'); unlike ($output, qr/two/, 'i2'); unlike ($output, qr/three/, 'i3'); diff --git a/test/filter.t b/test/filter.t index 1556e203a..5737d7cfa 100755 --- a/test/filter.t +++ b/test/filter.t @@ -39,15 +39,15 @@ if (open my $fh, '>', 'filter.rc') } # Test the filters. -qx{../src/task rc:filter.rc add project:A priority:H +tag one foo}; -qx{../src/task rc:filter.rc add project:A priority:H two}; -qx{../src/task rc:filter.rc add project:A three}; -qx{../src/task rc:filter.rc add priority:H four}; -qx{../src/task rc:filter.rc add +tag five}; -qx{../src/task rc:filter.rc add six foo}; -qx{../src/task rc:filter.rc add priority:L seven bar foo}; +qx{../src/task rc:filter.rc add project:A priority:H +tag one foo 2>&1}; +qx{../src/task rc:filter.rc add project:A priority:H two 2>&1}; +qx{../src/task rc:filter.rc add project:A three 2>&1}; +qx{../src/task rc:filter.rc add priority:H four 2>&1}; +qx{../src/task rc:filter.rc add +tag five 2>&1}; +qx{../src/task rc:filter.rc add six foo 2>&1}; +qx{../src/task rc:filter.rc add priority:L seven bar foo 2>&1}; -my $output = qx{../src/task rc:filter.rc list}; +my $output = qx{../src/task rc:filter.rc list 2>&1}; like ($output, qr/one/, 'a1'); like ($output, qr/two/, 'a2'); like ($output, qr/three/, 'a3'); @@ -56,7 +56,7 @@ like ($output, qr/five/, 'a5'); like ($output, qr/six/, 'a6'); like ($output, qr/seven/, 'a7'); -$output = qx{../src/task rc:filter.rc list project:A}; +$output = qx{../src/task rc:filter.rc list project:A 2>&1}; like ($output, qr/one/, 'b1'); like ($output, qr/two/, 'b2'); like ($output, qr/three/, 'b3'); @@ -65,7 +65,7 @@ unlike ($output, qr/five/, 'b5'); unlike ($output, qr/six/, 'b6'); unlike ($output, qr/seven/, 'b7'); -$output = qx{../src/task rc:filter.rc list priority:H}; +$output = qx{../src/task rc:filter.rc list priority:H 2>&1}; like ($output, qr/one/, 'c1'); like ($output, qr/two/, 'c2'); unlike ($output, qr/three/, 'c3'); @@ -74,7 +74,7 @@ unlike ($output, qr/five/, 'c5'); unlike ($output, qr/six/, 'c6'); unlike ($output, qr/seven/, 'c7'); -$output = qx{../src/task rc:filter.rc list priority:}; +$output = qx{../src/task rc:filter.rc list priority: 2>&1}; unlike ($output, qr/one/, 'd1'); unlike ($output, qr/two/, 'd2'); like ($output, qr/three/, 'd3'); @@ -83,7 +83,7 @@ like ($output, qr/five/, 'd5'); like ($output, qr/six/, 'd6'); unlike ($output, qr/seven/, 'd7'); -$output = qx{../src/task rc:filter.rc list foo}; +$output = qx{../src/task rc:filter.rc list foo 2>&1}; like ($output, qr/one/, 'e1'); unlike ($output, qr/two/, 'e2'); unlike ($output, qr/three/, 'e3'); @@ -92,7 +92,7 @@ unlike ($output, qr/five/, 'e5'); like ($output, qr/six/, 'e6'); like ($output, qr/seven/, 'e7'); -$output = qx{../src/task rc:filter.rc list foo bar}; +$output = qx{../src/task rc:filter.rc list foo bar 2>&1}; unlike ($output, qr/one/, 'f1'); unlike ($output, qr/two/, 'f2'); unlike ($output, qr/three/, 'f3'); @@ -101,7 +101,7 @@ unlike ($output, qr/five/, 'f5'); unlike ($output, qr/six/, 'f6'); like ($output, qr/seven/, 'f7'); -$output = qx{../src/task rc:filter.rc list +tag}; +$output = qx{../src/task rc:filter.rc list +tag 2>&1}; like ($output, qr/one/, 'g1'); unlike ($output, qr/two/, 'g2'); unlike ($output, qr/three/, 'g3'); @@ -110,7 +110,7 @@ like ($output, qr/five/, 'g5'); unlike ($output, qr/six/, 'g6'); unlike ($output, qr/seven/, 'g7'); -$output = qx{../src/task rc:filter.rc list -tag}; +$output = qx{../src/task rc:filter.rc list -tag 2>&1}; unlike ($output, qr/one/, 'h1'); like ($output, qr/two/, 'h2'); like ($output, qr/three/, 'h3'); @@ -119,7 +119,7 @@ unlike ($output, qr/five/, 'h5'); like ($output, qr/six/, 'h6'); like ($output, qr/seven/, 'h7'); -$output = qx{../src/task rc:filter.rc list -missing}; +$output = qx{../src/task rc:filter.rc list -missing 2>&1}; like ($output, qr/one/, 'i1'); like ($output, qr/two/, 'i2'); like ($output, qr/three/, 'i3'); @@ -128,7 +128,7 @@ like ($output, qr/five/, 'i5'); like ($output, qr/six/, 'i6'); like ($output, qr/seven/, 'i7'); -$output = qx{../src/task rc:filter.rc list +tag -tag}; +$output = qx{../src/task rc:filter.rc list +tag -tag 2>&1}; unlike ($output, qr/one/, 'j1'); unlike ($output, qr/two/, 'j2'); unlike ($output, qr/three/, 'j3'); @@ -137,7 +137,7 @@ unlike ($output, qr/five/, 'j5'); unlike ($output, qr/six/, 'j6'); unlike ($output, qr/seven/, 'j7'); -$output = qx{../src/task rc:filter.rc list project:A priority:H}; +$output = qx{../src/task rc:filter.rc list project:A priority:H 2>&1}; like ($output, qr/one/, 'k1'); like ($output, qr/two/, 'k2'); unlike ($output, qr/three/, 'k3'); @@ -146,7 +146,7 @@ unlike ($output, qr/five/, 'k5'); unlike ($output, qr/six/, 'k6'); unlike ($output, qr/seven/, 'k7'); -$output = qx{../src/task rc:filter.rc list project:A priority:}; +$output = qx{../src/task rc:filter.rc list project:A priority: 2>&1}; unlike ($output, qr/one/, 'l1'); unlike ($output, qr/two/, 'l2'); like ($output, qr/three/, 'l3'); @@ -155,7 +155,7 @@ unlike ($output, qr/five/, 'l5'); unlike ($output, qr/six/, 'l6'); unlike ($output, qr/seven/, 'l7'); -$output = qx{../src/task rc:filter.rc list project:A foo}; +$output = qx{../src/task rc:filter.rc list project:A foo 2>&1}; like ($output, qr/one/, 'm1'); unlike ($output, qr/two/, 'm2'); unlike ($output, qr/three/, 'm3'); @@ -164,7 +164,7 @@ unlike ($output, qr/five/, 'm5'); unlike ($output, qr/six/, 'm6'); unlike ($output, qr/seven/, 'm7'); -$output = qx{../src/task rc:filter.rc list project:A +tag}; +$output = qx{../src/task rc:filter.rc list project:A +tag 2>&1}; like ($output, qr/one/, 'n1'); unlike ($output, qr/two/, 'n2'); unlike ($output, qr/three/, 'n3'); @@ -173,7 +173,7 @@ unlike ($output, qr/five/, 'n5'); unlike ($output, qr/six/, 'n6'); unlike ($output, qr/seven/, 'n7'); -$output = qx{../src/task rc:filter.rc list project:A priority:H foo}; +$output = qx{../src/task rc:filter.rc list project:A priority:H foo 2>&1}; like ($output, qr/one/, 'o1'); unlike ($output, qr/two/, 'o2'); unlike ($output, qr/three/, 'o3'); @@ -182,7 +182,7 @@ unlike ($output, qr/five/, 'o5'); unlike ($output, qr/six/, 'o6'); unlike ($output, qr/seven/, 'o7'); -$output = qx{../src/task rc:filter.rc list project:A priority:H +tag}; +$output = qx{../src/task rc:filter.rc list project:A priority:H +tag 2>&1}; like ($output, qr/one/, 'p1'); unlike ($output, qr/two/, 'p2'); unlike ($output, qr/three/, 'p3'); @@ -191,7 +191,7 @@ unlike ($output, qr/five/, 'p5'); unlike ($output, qr/six/, 'p6'); unlike ($output, qr/seven/, 'p7'); -$output = qx{../src/task rc:filter.rc list project:A priority:H foo +tag}; +$output = qx{../src/task rc:filter.rc list project:A priority:H foo +tag 2>&1}; like ($output, qr/one/, 'q1'); unlike ($output, qr/two/, 'q2'); unlike ($output, qr/three/, 'q3'); @@ -200,7 +200,7 @@ unlike ($output, qr/five/, 'q5'); unlike ($output, qr/six/, 'q6'); unlike ($output, qr/seven/, 'q7'); -$output = qx{../src/task rc:filter.rc list project:A priority:H foo +tag baz}; +$output = qx{../src/task rc:filter.rc list project:A priority:H foo +tag baz 2>&1}; unlike ($output, qr/one/, 'r1'); unlike ($output, qr/two/, 'r2'); unlike ($output, qr/three/, 'r3'); @@ -210,7 +210,7 @@ unlike ($output, qr/six/, 'r6'); unlike ($output, qr/seven/, 'r7'); # Regex filters. -#$output = qx{../src/task rc:filter.rc list rc.regex:on project:/[A-Z]/}; +#$output = qx{../src/task rc:filter.rc list rc.regex:on project:/[A-Z]/ 2>&1}; #like ($output, qr/one/, 's1'); #like ($output, qr/two/, 's2'); #like ($output, qr/three/, 's3'); @@ -219,7 +219,7 @@ unlike ($output, qr/seven/, 'r7'); #unlike ($output, qr/six/, 's6'); #unlike ($output, qr/seven/, 's7'); -#$output = qx{../src/task rc:filter.rc list rc.regex:on project:.}; +#$output = qx{../src/task rc:filter.rc list rc.regex:on project:. 2>&1}; #like ($output, qr/one/, 't1'); #like ($output, qr/two/, 't2'); #like ($output, qr/three/, 't3'); @@ -228,7 +228,7 @@ unlike ($output, qr/seven/, 'r7'); #unlike ($output, qr/six/, 't6'); #unlike ($output, qr/seven/, 't7'); -$output = qx{../src/task rc:filter.rc rc.regex:on list /fo\{2\}/}; +$output = qx{../src/task rc:filter.rc rc.regex:on list /fo\{2\}/ 2>&1}; like ($output, qr/one/, 'u1'); unlike ($output, qr/two/, 'u2'); unlike ($output, qr/three/, 'u3'); @@ -237,7 +237,7 @@ unlike ($output, qr/five/, 'u5'); like ($output, qr/six/, 'u6'); like ($output, qr/seven/, 'u7'); -#$output = qx{../src/task rc:filter.rc rc.regex:on list /f../ /b../}; +#$output = qx{../src/task rc:filter.rc rc.regex:on list /f../ /b../ 2>&1}; #unlike ($output, qr/one/, 'v1'); #unlike ($output, qr/two/, 'v2'); #unlike ($output, qr/three/, 'v3'); @@ -246,7 +246,7 @@ like ($output, qr/seven/, 'u7'); #unlike ($output, qr/six/, 'v6'); #like ($output, qr/seven/, 'v7'); -$output = qx{../src/task rc:filter.rc rc.regex:on list /^s/}; +$output = qx{../src/task rc:filter.rc rc.regex:on list /^s/ 2>&1}; unlike ($output, qr/one/, 'w1'); unlike ($output, qr/two/, 'w2'); unlike ($output, qr/three/, 'w3'); @@ -255,7 +255,7 @@ unlike ($output, qr/five/, 'w5'); like ($output, qr/six/, 'w6'); like ($output, qr/seven/, 'w7'); -$output = qx{../src/task rc:filter.rc rc.regex:on list /^.i/}; +$output = qx{../src/task rc:filter.rc rc.regex:on list /^.i/ 2>&1}; unlike ($output, qr/one/, 'x1'); unlike ($output, qr/two/, 'x2'); unlike ($output, qr/three/, 'x3'); @@ -264,7 +264,7 @@ like ($output, qr/five/, 'x5'); like ($output, qr/six/, 'x6'); unlike ($output, qr/seven/, 'x7'); -$output = qx{../src/task rc:filter.rc rc.regex:on list "/two|five/"}; +$output = qx{../src/task rc:filter.rc rc.regex:on list "/two|five/" 2>&1}; unlike ($output, qr/one/, 'y1'); like ($output, qr/two/, 'y2'); unlike ($output, qr/three/, 'y3'); diff --git a/test/fontunderline.t b/test/fontunderline.t index 98cfbb17a..7782ddd9e 100755 --- a/test/fontunderline.t +++ b/test/fontunderline.t @@ -54,22 +54,22 @@ if (open my $fh, '>', 'font.rc') # # * When isatty (fileno (stdout)) is false, color is automatically disabled. -qx{../src/task rc:font.rc add foo}; -my $output = qx{../src/task 1 info rc:font.rc rc.color:off rc._forcecolor:off rc.fontunderline:off}; +qx{../src/task rc:font.rc add foo 2>&1}; +my $output = qx{../src/task 1 info rc:font.rc rc.color:off rc._forcecolor:off rc.fontunderline:off 2>&1}; like ($output, qr/--------/, '0,0,0 -> dashes'); -$output = qx{../src/task 1 info rc:font.rc rc.color:off rc._forcecolor:off rc.fontunderline:on}; +$output = qx{../src/task 1 info rc:font.rc rc.color:off rc._forcecolor:off rc.fontunderline:on 2>&1}; like ($output, qr/--------/, '0,0,1 -> dashes'); -$output = qx{../src/task 1 info rc:font.rc rc.color:off rc._forcecolor:on rc.fontunderline:off}; +$output = qx{../src/task 1 info rc:font.rc rc.color:off rc._forcecolor:on rc.fontunderline:off 2>&1}; like ($output, qr/--------/, '0,1,0 -> dashes'); -$output = qx{../src/task 1 info rc:font.rc rc.color:off rc._forcecolor:on rc.fontunderline:on}; +$output = qx{../src/task 1 info rc:font.rc rc.color:off rc._forcecolor:on rc.fontunderline:on 2>&1}; unlike ($output, qr/--------/, '0,1,1 -> underline'); -$output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:off rc.fontunderline:off}; +$output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:off rc.fontunderline:off 2>&1}; like ($output, qr/--------/, '1,0,0 -> dashes'); -$output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:off rc.fontunderline:on}; +$output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:off rc.fontunderline:on 2>&1}; like ($output, qr/--------/, '1,0,1 -> dashes'); -$output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:on rc.fontunderline:off}; +$output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:on rc.fontunderline:off 2>&1}; like ($output, qr/--------/, '1,1,0 -> dashes'); -$output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:on rc.fontunderline:on}; +$output = qx{../src/task 1 info rc:font.rc rc.color:on rc._forcecolor:on rc.fontunderline:on 2>&1}; unlike ($output, qr/--------/, '1,1,1 -> underline'); # Cleanup. diff --git a/test/history.annual.t b/test/history.annual.t index 2111e6309..69f996cbe 100755 --- a/test/history.annual.t +++ b/test/history.annual.t @@ -62,7 +62,7 @@ EOF ok (-r 'pending.data', 'Created pending.data'); } -my $output = qx{../src/task rc:time.rc history.annual}; +my $output = qx{../src/task rc:time.rc history.annual 2>&1}; like ($output, qr/7\s+1\s+0\s+6/, 'history.annual - last year'); like ($output, qr/2\s+3\s+3\s+-4/, 'history.annual - this year'); like ($output, qr/4\s+2\s+1\s+1/, 'history.annual - average'); diff --git a/test/history.monthly.t b/test/history.monthly.t index 3ed4aeadf..cc4a947f0 100755 --- a/test/history.monthly.t +++ b/test/history.monthly.t @@ -62,7 +62,7 @@ EOF ok (-r 'pending.data', 'Created pending.data'); } -my $output = qx{../src/task rc:time.rc history.monthly}; +my $output = qx{../src/task rc:time.rc history.monthly 2>&1}; like ($output, qr/7\s+1\s+0\s+6/, 'history.monthly - last month'); like ($output, qr/2\s+3\s+3\s+-4/, 'history.monthly - this month'); like ($output, qr/4\s+2\s+1\s+1/, 'history.monthly - average'); diff --git a/test/hook.on-exit.t b/test/hook.on-exit.t index 7b53a17af..009ce22b6 100755 --- a/test/hook.on-exit.t +++ b/test/hook.on-exit.t @@ -48,11 +48,11 @@ if (open my $fh, '>', 'hook') } # Test the hook. -my $output = qx{../src/task rc:hook.rc version}; +my $output = qx{../src/task rc:hook.rc version 2>&1}; if ($output =~ /PUC-Rio/) { # Test the hook. - $output = qx{../src/task rc:hook.rc _version}; + $output = qx{../src/task rc:hook.rc _version 2>&1}; like ($output, qr/\w{7}\nmarker/ms, 'Found marker after output'); } else diff --git a/test/hook.on-launch.t b/test/hook.on-launch.t index 2d23275b2..992fff7a2 100755 --- a/test/hook.on-launch.t +++ b/test/hook.on-launch.t @@ -47,11 +47,11 @@ if (open my $fh, '>', 'hook') ok (-r 'hook', 'Created hook'); } -my $output = qx{../src/task rc:hook.rc version}; +my $output = qx{../src/task rc:hook.rc version 2>&1}; if ($output =~ /PUC-Rio/) { # Test the hook. - $output = qx{../src/task rc:hook.rc _version}; + $output = qx{../src/task rc:hook.rc _version 2>&1}; like ($output, qr/^marker.+\b\w{7}\b/ms, 'Found marker before output'); } else diff --git a/test/ids.t b/test/ids.t index 9f93e3690..e6b7094cb 100755 --- a/test/ids.t +++ b/test/ids.t @@ -40,19 +40,19 @@ if (open my $fh, '>', 'ids.rc') } # Test the count command. -qx{../src/task rc:ids.rc add one +A +B}; -qx{../src/task rc:ids.rc add two +A }; -qx{../src/task rc:ids.rc add three +A +B}; -qx{../src/task rc:ids.rc add four }; -qx{../src/task rc:ids.rc add five +A +B}; +qx{../src/task rc:ids.rc add one +A +B 2>&1}; +qx{../src/task rc:ids.rc add two +A 2>&1}; +qx{../src/task rc:ids.rc add three +A +B 2>&1}; +qx{../src/task rc:ids.rc add four 2>&1}; +qx{../src/task rc:ids.rc add five +A +B 2>&1}; -my $output = qx{../src/task rc:ids.rc ids +A}; +my $output = qx{../src/task rc:ids.rc ids +A 2>/dev/null}; like ($output, qr/^1-3,5$/, 'ids +A --> 1-3,5'); -$output = qx{../src/task rc:ids.rc ids +B}; +$output = qx{../src/task rc:ids.rc ids +B 2>/dev/null}; like ($output, qr/^1,3,5$/, 'ids +B --> 1,3,5'); -$output = qx{../src/task rc:ids.rc ids +A -B}; +$output = qx{../src/task rc:ids.rc ids +A -B 2>/dev/null}; like ($output, qr/^2$/, 'ids +A -B --> 2'); $output = qx{../src/task rc:ids.rc _ids +A}; @@ -61,7 +61,7 @@ like ($output, qr/^1\n2\n3\n5$/, '_ids +A --> 1\n2\n3\n5'); $output = qx{../src/task rc:ids.rc _zshids +A}; like ($output, qr/^1:one\n2:two\n3:three\n5:five$/, '_zshids +A --> 1:one\n2:two\n3:three\n5:five'); -$output = qx{../src/task rc:ids.rc uuids +A}; +$output = qx{../src/task rc:ids.rc uuids +A 2>/dev/null}; like ($output, qr/^[0-9a-f-]+,[0-9a-f-]+,[0-9a-f-]+,[0-9a-f-]+$/, 'uuids +A --> uuid,uuid,uuid,uuid'); $output = qx{../src/task rc:ids.rc _uuids +A}; diff --git a/test/import.t b/test/import.t index 8196b73b5..1c0aeee8a 100755 --- a/test/import.t +++ b/test/import.t @@ -55,7 +55,7 @@ my $output = qx{../src/task rc:import.rc import import.txt 2>&1 >/dev/null}; like ($output, qr/Imported 3 tasks\./, 'no errors'); # Imported 3 tasks successfully. -$output = qx{../src/task rc:import.rc list}; +$output = qx{../src/task rc:import.rc list 2>&1}; # ID Project Pri Due Active Age Description # -- ------- --- --- ------ ------- ----------- # 1 A 1.5 yrs zero @@ -67,7 +67,7 @@ like ($output, qr/1.+A.+zero/, 't1 present'); like ($output, qr/2.+B.+one/, 't2 present'); unlike ($output, qr/3.+two/, 't3 missing'); -$output = qx{../src/task rc:import.rc completed}; +$output = qx{../src/task rc:import.rc completed 2>&1}; # Complete Project Pri Age Description # --------- ------- --- ------- ----------- # 2/13/2009 1.5 yrs two diff --git a/test/import.todo.sh.t b/test/import.todo.sh.t index ddfdbde32..1e3f97851 100755 --- a/test/import.todo.sh.t +++ b/test/import.todo.sh.t @@ -64,57 +64,57 @@ if (open my $fh, '>', 'import.txt') } # Convert todo.sh --> task JSON. -qx{../scripts/add-ons/import-todo.sh.pl import.json}; +qx{../scripts/add-ons/import-todo.sh.pl import.json 2>&1}; # Import the JSON. -my $output = qx{../src/task rc:import.rc import import.json}; +my $output = qx{../src/task rc:import.rc import import.json 2>&1}; diag ($output); -$output = qx{../src/task rc:import.rc info 1}; +$output = qx{../src/task rc:import.rc info 1 2>&1}; like ($output, qr/^Priority.+H/ms, '1 pri:H'); like ($output, qr/^Tags.+phone/ms, '1 +phone'); like ($output, qr/^Description.+\@phone thank Mom for the meatballs/ms, '1 '); -$output = qx{../src/task rc:import.rc info 2}; +$output = qx{../src/task rc:import.rc info 2 2>&1}; like ($output, qr/^Priority.+M/ms, '2 pri:M'); like ($output, qr/^Project.+GarageSale/ms, '2 '); like ($output, qr/^Description.+/ms, '2 '); -$output = qx{../src/task rc:import.rc info 3}; +$output = qx{../src/task rc:import.rc info 3 2>&1}; like ($output, qr/^Project.+GarageSale/ms, '3 '); like ($output, qr/^Description.+\+GarageSale \@home post signs around the neighborhood/ms, '3 '); -$output = qx{../src/task rc:import.rc info 4}; +$output = qx{../src/task rc:import.rc info 4 2>&1}; like ($output, qr/^Description.+\@shopping Eskimo pies/ms, '4 '); -$output = qx{../src/task rc:import.rc info 5}; +$output = qx{../src/task rc:import.rc info 5 2>&1}; like ($output, qr/^Priority.+H/ms, '5 pri:H'); like ($output, qr/^Description.+Call Mom/ms, '5 '); -$output = qx{../src/task rc:import.rc info 6}; +$output = qx{../src/task rc:import.rc info 6 2>&1}; like ($output, qr/^Description.+Really gotta call Mom \(A\) \@phone \@someday/ms, '6 '); -$output = qx{../src/task rc:import.rc info 7}; +$output = qx{../src/task rc:import.rc info 7 2>&1}; like ($output, qr/^Description.+\(b\)->get back to the boss/ms, '7 '); -$output = qx{../src/task rc:import.rc info 8}; +$output = qx{../src/task rc:import.rc info 8 2>&1}; like ($output, qr/^Project.+TodoTxt/ms, '8 '); like ($output, qr/^Description.+Document \+TodoTxt task format/ms, '8 '); -$output = qx{../src/task rc:import.rc info 9}; +$output = qx{../src/task rc:import.rc info 9 2>&1}; like ($output, qr/^Priority.+H/ms, '9 pri:H'); like ($output, qr/^Description.+Call Mom/ms, '9 '); -$output = qx{../src/task rc:import.rc info 10}; +$output = qx{../src/task rc:import.rc info 10 2>&1}; like ($output, qr/^Priority.+H/ms, '10 pri:H'); like ($output, qr/^Description.+Call Mom 2011-03-02/ms, '10 '); -$output = qx{../src/task rc:import.rc info 11}; +$output = qx{../src/task rc:import.rc info 11 2>&1}; like ($output, qr/^Priority.+H/ms, '11 pri:H'); like ($output, qr/^Project.+Family/ms, '8 '); like ($output, qr/^Description.+Call Mom \+Family \+PeaceLoveAndHappiness \@iphone \@phone/ms, '11 '); -$output = qx{../src/task rc:import.rc info 12}; +$output = qx{../src/task rc:import.rc info 12 2>&1}; like ($output, qr/^Description.+xylophone lesson/ms, '12 '); # TODO and now the completed ones. diff --git a/test/import.yaml.t b/test/import.yaml.t index 485aff815..15556c8ff 100755 --- a/test/import.yaml.t +++ b/test/import.yaml.t @@ -70,13 +70,13 @@ EOF } # Convert YAML --> task JSON. -qx{../scripts/add-ons/import-yaml.pl import.json}; +qx{../scripts/add-ons/import-yaml.pl import.json 2>&1}; # Import the JSON. my $output = qx{../src/task rc:import.rc import import.json 2>&1 >/dev/null}; like ($output, qr/Imported 3 tasks\./, '3 tasks imported'); -$output = qx{../src/task rc:import.rc list}; +$output = qx{../src/task rc:import.rc list 2>&1}; # ID Project Pri Due Active Age Description # -- ------- --- --- ------ ------- ----------- # 1 A 1.5 yrs zero @@ -88,7 +88,7 @@ like ($output, qr/1.+A.+zero/, 't1 present'); like ($output, qr/2.+B.+one/, 't2 present'); unlike ($output, qr/3.+two/, 't3 missing'); -$output = qx{../src/task rc:import.rc completed}; +$output = qx{../src/task rc:import.rc completed 2>&1}; # Complete Project Pri Age Description # --------- ------- --- ------- ----------- # 2/13/2009 1.5 yrs two @@ -122,14 +122,14 @@ EOF } # Convert YAML --> task JSON. -qx{../scripts/add-ons/import-yaml.pl import.json}; +qx{../scripts/add-ons/import-yaml.pl import.json 2>&1}; # Import the JSON. $output = qx{../src/task rc:import.rc import import.json 2>&1 >/dev/null}; like ($output, qr/Imported 1 tasks\./, '1 task imported'); # Verify. -$output = qx{../src/task rc:import.rc list}; +$output = qx{../src/task rc:import.rc list 2>&1}; # ID Project Pri Due Active Age Description # -- ------- --- --- ------ ---- ----------- # 3 2.6y three diff --git a/test/json_test.t b/test/json_test.t index 8e6b177a7..179c09d54 100755 --- a/test/json_test.t +++ b/test/json_test.t @@ -36,7 +36,7 @@ plan tests => scalar @files; my $output; for my $file (@files) { - $output = qx{./json_test $file}; + $output = qx{./json_test $file 2>&1}; unlike ($output, qr/^Error/, "json_test $file"); } diff --git a/test/label.t b/test/label.t index e7b879322..21586c1c8 100755 --- a/test/label.t +++ b/test/label.t @@ -44,12 +44,12 @@ if (open my $fh, '>', 'custom.rc') } # Generate the help screen, and locate the custom report on it. -my $output = qx{../src/task rc:custom.rc help}; +my $output = qx{../src/task rc:custom.rc help 2>&1}; like ($output, qr/task foo\s+DESC\n/m, 'report.foo'); -qx{../src/task rc:custom.rc add project:A one}; -qx{../src/task rc:custom.rc add two}; -$output = qx{../src/task rc:custom.rc foo}; +qx{../src/task rc:custom.rc add project:A one 2>&1}; +qx{../src/task rc:custom.rc add two 2>&1}; +$output = qx{../src/task rc:custom.rc foo 2>&1}; like ($output, qr/ID/, 'custom label for id column'); like ($output, qr/DESCRIPTION/, 'custom label for description column'); like ($output, qr/one/, 'custom filter included'); diff --git a/test/limit.t b/test/limit.t index c25167c43..c239f541a 100755 --- a/test/limit.t +++ b/test/limit.t @@ -39,47 +39,47 @@ if (open my $fh, '>', 'limit.rc') } # Add a large number of tasks (> 25). -qx{../src/task rc:limit.rc add one}; -qx{../src/task rc:limit.rc add two}; -qx{../src/task rc:limit.rc add three}; -qx{../src/task rc:limit.rc add four}; -qx{../src/task rc:limit.rc add five}; -qx{../src/task rc:limit.rc add six}; -qx{../src/task rc:limit.rc add seven}; -qx{../src/task rc:limit.rc add eight}; -qx{../src/task rc:limit.rc add nine}; -qx{../src/task rc:limit.rc add ten}; -qx{../src/task rc:limit.rc add eleven}; -qx{../src/task rc:limit.rc add twelve}; -qx{../src/task rc:limit.rc add thirteen}; -qx{../src/task rc:limit.rc add fourteen}; -qx{../src/task rc:limit.rc add fifteen}; -qx{../src/task rc:limit.rc add sixteen}; -qx{../src/task rc:limit.rc add seventeen}; -qx{../src/task rc:limit.rc add eighteen}; -qx{../src/task rc:limit.rc add nineteen}; -qx{../src/task rc:limit.rc add twenty}; -qx{../src/task rc:limit.rc add twenty one}; -qx{../src/task rc:limit.rc add twenty two}; -qx{../src/task rc:limit.rc add twenty three}; -qx{../src/task rc:limit.rc add twenty four}; -qx{../src/task rc:limit.rc add twenty five}; -qx{../src/task rc:limit.rc add twenty six}; -qx{../src/task rc:limit.rc add twenty seven}; -qx{../src/task rc:limit.rc add twenty eight}; -qx{../src/task rc:limit.rc add twenty nine}; -qx{../src/task rc:limit.rc add thirty}; +qx{../src/task rc:limit.rc add one 2>&1}; +qx{../src/task rc:limit.rc add two 2>&1}; +qx{../src/task rc:limit.rc add three 2>&1}; +qx{../src/task rc:limit.rc add four 2>&1}; +qx{../src/task rc:limit.rc add five 2>&1}; +qx{../src/task rc:limit.rc add six 2>&1}; +qx{../src/task rc:limit.rc add seven 2>&1}; +qx{../src/task rc:limit.rc add eight 2>&1}; +qx{../src/task rc:limit.rc add nine 2>&1}; +qx{../src/task rc:limit.rc add ten 2>&1}; +qx{../src/task rc:limit.rc add eleven 2>&1}; +qx{../src/task rc:limit.rc add twelve 2>&1}; +qx{../src/task rc:limit.rc add thirteen 2>&1}; +qx{../src/task rc:limit.rc add fourteen 2>&1}; +qx{../src/task rc:limit.rc add fifteen 2>&1}; +qx{../src/task rc:limit.rc add sixteen 2>&1}; +qx{../src/task rc:limit.rc add seventeen 2>&1}; +qx{../src/task rc:limit.rc add eighteen 2>&1}; +qx{../src/task rc:limit.rc add nineteen 2>&1}; +qx{../src/task rc:limit.rc add twenty 2>&1}; +qx{../src/task rc:limit.rc add twenty one 2>&1}; +qx{../src/task rc:limit.rc add twenty two 2>&1}; +qx{../src/task rc:limit.rc add twenty three 2>&1}; +qx{../src/task rc:limit.rc add twenty four 2>&1}; +qx{../src/task rc:limit.rc add twenty five 2>&1}; +qx{../src/task rc:limit.rc add twenty six 2>&1}; +qx{../src/task rc:limit.rc add twenty seven 2>&1}; +qx{../src/task rc:limit.rc add twenty eight 2>&1}; +qx{../src/task rc:limit.rc add twenty nine 2>&1}; +qx{../src/task rc:limit.rc add thirty 2>&1}; -my $output = qx{../src/task rc:limit.rc ls}; +my $output = qx{../src/task rc:limit.rc ls 2>&1}; like ($output, qr/^30 tasks$/ms, 'unlimited'); -$output = qx{../src/task rc:limit.rc ls limit:0}; +$output = qx{../src/task rc:limit.rc ls limit:0 2>&1}; like ($output, qr/^30 tasks$/ms, 'limited to 0 - unlimited'); -$output = qx{../src/task rc:limit.rc ls limit:3}; +$output = qx{../src/task rc:limit.rc ls limit:3 2>&1}; like ($output, qr/^30 tasks, 3 shown$/ms, 'limited to 3'); -$output = qx{../src/task rc:limit.rc ls limit:page}; +$output = qx{../src/task rc:limit.rc ls limit:page 2>&1}; like ($output, qr/^30 tasks, truncated to 18 lines$/ms, 'limited to page'); # Cleanup. diff --git a/test/list.all.projects.t b/test/list.all.projects.t index 6e57cd092..65c3a2626 100755 --- a/test/list.all.projects.t +++ b/test/list.all.projects.t @@ -40,19 +40,19 @@ if (open my $fh, '>', 'projects.rc') # Create a data set of two tasks, with unique project names, one # pending, one completed. -qx{../src/task rc:projects.rc add project:p1 one}; -qx{../src/task rc:projects.rc add project:p2 two}; -qx{../src/task rc:projects.rc 1 done}; +qx{../src/task rc:projects.rc add project:p1 one 2>&1}; +qx{../src/task rc:projects.rc add project:p2 two 2>&1}; +qx{../src/task rc:projects.rc 1 done 2>&1}; -my $output = qx{../src/task rc:projects.rc ls}; +my $output = qx{../src/task rc:projects.rc ls 2>&1}; unlike ($output, qr/p1/, 'p1 done'); like ($output, qr/p2/, 'p2 pending'); -$output = qx{../src/task rc:projects.rc projects}; +$output = qx{../src/task rc:projects.rc projects 2>&1}; unlike ($output, qr/p1/, 'p1 done'); like ($output, qr/p2/, 'p2 pending'); -$output = qx{../src/task rc:projects.rc rc.list.all.projects:yes projects}; +$output = qx{../src/task rc:projects.rc rc.list.all.projects:yes projects 2>&1}; like ($output, qr/p1/, 'p1 listed'); like ($output, qr/p2/, 'p2 listed'); diff --git a/test/list.all.tags.t b/test/list.all.tags.t index 3c4c6a367..a7f5d8802 100755 --- a/test/list.all.tags.t +++ b/test/list.all.tags.t @@ -41,18 +41,18 @@ if (open my $fh, '>', 'tags.rc') # Create a data set of two tasks, with unique project names, one # pending, one completed. -qx{../src/task rc:tags.rc add +t1 one}; -qx{../src/task rc:tags.rc add +t2 two}; -qx{../src/task rc:tags.rc 1 done}; -my $output = qx{../src/task rc:tags.rc long}; +qx{../src/task rc:tags.rc add +t1 one 2>&1}; +qx{../src/task rc:tags.rc add +t2 two 2>&1}; +qx{../src/task rc:tags.rc 1 done 2>&1}; +my $output = qx{../src/task rc:tags.rc long 2>&1}; unlike ($output, qr/t1/, 't1 done'); like ($output, qr/t2/, 't2 pending'); -$output = qx{../src/task rc:tags.rc tags}; +$output = qx{../src/task rc:tags.rc tags 2>&1}; unlike ($output, qr/t1/, 't1 done'); like ($output, qr/t2/, 't2 pending'); -$output = qx{../src/task rc:tags.rc rc.list.all.tags:yes tags}; +$output = qx{../src/task rc:tags.rc rc.list.all.tags:yes tags 2>&1}; like ($output, qr/t1/, 't1 listed'); like ($output, qr/t2/, 't2 listed'); diff --git a/test/log.t b/test/log.t index a4a8e99d9..b5d73a44f 100755 --- a/test/log.t +++ b/test/log.t @@ -40,8 +40,8 @@ if (open my $fh, '>', 'log.rc') } # Test the log command. -qx{../src/task rc:log.rc log This is a test}; -my $output = qx{../src/task rc:log.rc completed}; +qx{../src/task rc:log.rc log This is a test 2>&1}; +my $output = qx{../src/task rc:log.rc completed 2>&1}; like ($output, qr/This is a test/, 'log description'); # Cleanup. diff --git a/test/merge.duplicates.t b/test/merge.duplicates.t index 260779c9d..33bc313af 100755 --- a/test/merge.duplicates.t +++ b/test/merge.duplicates.t @@ -95,83 +95,83 @@ if (open my $fh, '>', '3.rc') ####################################### # Create tasks on 1st resource -qx{../src/task rc:1.rc add Task1}; +qx{../src/task rc:1.rc add Task1 2>&1}; diag ("7 second delay"); sleep(1); -qx{../src/task rc:1.rc add Task2}; +qx{../src/task rc:1.rc add Task2 2>&1}; sleep(1); -qx{../src/task rc:1.rc add Task3}; +qx{../src/task rc:1.rc add Task3 2>&1}; sleep(1); -qx{../src/task rc:1.rc add Task4}; +qx{../src/task rc:1.rc add Task4 2>&1}; # Merge with backup -my $output = qx{../src/task rc:1.rc push ./backup/}; +my $output = qx{../src/task rc:1.rc push ./backup/ 2>&1}; ####################################### # Modify on 2nd resource # first merge -$output = qx{../src/task rc:2.rc merge}; +$output = qx{../src/task rc:2.rc merge 2>&1}; like ($output, qr/Merge complete/, "res2: pre-merge completed"); # complete Task1 -qx{../src/task rc:2.rc 1 done}; +qx{../src/task rc:2.rc 1 done 2>&1}; sleep(1); ####################################### # Modify on 3rd resource # first merge -$output = qx{../src/task rc:3.rc merge}; +$output = qx{../src/task rc:3.rc merge 2>&1}; like ($output, qr/Merge complete/, "res3: pre-merge completed"); # complete Task1 -qx{../src/task rc:3.rc 1 done}; +qx{../src/task rc:3.rc 1 done 2>&1}; sleep(1); # now merge 3rd resource -$output = qx{../src/task rc:3.rc merge}; +$output = qx{../src/task rc:3.rc merge 2>&1}; like ($output, qr/Merge complete/, "res3: post-merge completed"); unlike ($output, qr/Missing/, "no missing entry"); # and merge 2nd resource -$output = qx{../src/task rc:2.rc merge}; +$output = qx{../src/task rc:2.rc merge 2>&1}; like ($output, qr/Merge complete/, "res2: post-merge completed"); unlike ($output, qr/Missing/, "no missing entry"); # merge 3rd -$output = qx{../src/task rc:3.rc merge}; +$output = qx{../src/task rc:3.rc merge 2>&1}; like ($output, qr/Merge complete/, "res3: post-merge completed"); unlike ($output, qr/Missing/, "no missing entry"); like ($output, qr/Retain/, "retained changes"); # 16 # pre-merge 1st -$output = qx{../src/task rc:1.rc merge}; +$output = qx{../src/task rc:1.rc merge 2>&1}; like ($output, qr/Merge complete/, "res1: pre-merge completed"); # 17 unlike ($output, qr/Missing/, "no missing entry"); -qx{../src/task rc:1.rc add Task5}; +qx{../src/task rc:1.rc add Task5 2>&1}; sleep(1); -qx(../src/task rc:1.rc 4 done); +qx{../src/task rc:1.rc 4 done 2>&1}; sleep(1); # merge -$output = qx{../src/task rc:1.rc merge}; +$output = qx{../src/task rc:1.rc merge 2>&1}; like ($output, qr/Merge complete/, "res1: post-merge completed"); unlike ($output, qr/Missing/, "no missing entry"); # pre-merge 2nd res -$output = qx{../src/task rc:2.rc merge}; +$output = qx{../src/task rc:2.rc merge 2>&1}; like ($output, qr/Merge complete/, "res2: pre-merge completed"); unlike ($output, qr/Missing/, "no missing entry"); # merge -$output = qx{../src/task rc:1.rc merge}; +$output = qx{../src/task rc:1.rc merge 2>&1}; like ($output, qr/up-to-date/, "res1: up-to-date"); unlike ($output, qr/Missing/, "no missing entry"); # pre-merge 2nd res -$output = qx{../src/task rc:2.rc merge}; +$output = qx{../src/task rc:2.rc merge 2>&1}; like ($output, qr/up-to-date/, "res2: up-to-date"); unlike ($output, qr/Missing/, "no missing entry"); diff --git a/test/merge.t b/test/merge.t index 980ce11e8..46b9bdbf8 100755 --- a/test/merge.t +++ b/test/merge.t @@ -71,22 +71,22 @@ if (open my $fh, '>', 'remote.rc') } # Create some basic tasks on both sides -qx{../src/task rc:local.rc add left_modified}; +qx{../src/task rc:local.rc add left_modified 2>&1}; diag ("25 second delay"); sleep 1; -qx{../src/task rc:local.rc add right_modified}; +qx{../src/task rc:local.rc add right_modified 2>&1}; sleep 1; -qx{../src/task rc:local.rc add left_newer}; +qx{../src/task rc:local.rc add left_newer 2>&1}; sleep 1; -qx{../src/task rc:local.rc add right_newer}; +qx{../src/task rc:local.rc add right_newer 2>&1}; sleep 1; -qx{../src/task rc:local.rc add left_deleted}; +qx{../src/task rc:local.rc add left_deleted 2>&1}; sleep 1; -qx{../src/task rc:local.rc add right_deleted}; +qx{../src/task rc:local.rc add right_deleted 2>&1}; sleep 1; -qx{../src/task rc:local.rc add left_completed}; +qx{../src/task rc:local.rc add left_completed 2>&1}; sleep 1; -qx{../src/task rc:local.rc add right_completed}; +qx{../src/task rc:local.rc add right_completed 2>&1}; sleep 1; copy ("local/undo.data", "remote/undo.data"); @@ -94,66 +94,66 @@ copy ("local/pending.data", "remote/pending.data"); copy ("local/completed.data", "remote/completed.data"); # make local modifications -qx{../src/task rc:local.rc add left_added}; #left_added +qx{../src/task rc:local.rc add left_added 2>&1}; #left_added sleep 1; -qx{../src/task rc:local.rc 1 modify prio:H}; #left_modified +qx{../src/task rc:local.rc 1 modify prio:H 2>&1}; #left_modified sleep 1; -qx{../src/task rc:local.rc 3 modify +stay}; #left_newer +qx{../src/task rc:local.rc 3 modify +stay 2>&1}; #left_newer sleep 1; -qx{../src/task rc:local.rc 4 modify project:test}; #right_newer +qx{../src/task rc:local.rc 4 modify project:test 2>&1}; #right_newer sleep 1; -qx{../src/task rc:local.rc 6 modify +delete}; #right_deleted +qx{../src/task rc:local.rc 6 modify +delete 2>&1}; #right_deleted sleep 1; # make remote modifications -qx{../src/task rc:remote.rc add right_added}; #right_added +qx{../src/task rc:remote.rc add right_added 2>&1}; #right_added sleep 1; -qx{../src/task rc:remote.rc 2 modify prio:L}; #right_modified +qx{../src/task rc:remote.rc 2 modify prio:L 2>&1}; #right_modified sleep 1; -qx{../src/task rc:remote.rc 2 modify wait:tomorrow}; #right_modified +qx{../src/task rc:remote.rc 2 modify wait:tomorrow 2>&1}; #right_modified sleep 1; -qx{../src/task rc:remote.rc 4 modify proj:realProject}; #right_newer +qx{../src/task rc:remote.rc 4 modify proj:realProject 2>&1}; #right_newer sleep 1; -qx{../src/task rc:remote.rc 5 modify project:deletion}; #left_deleted +qx{../src/task rc:remote.rc 5 modify project:deletion 2>&1}; #left_deleted sleep 1; -qx{../src/task rc:remote.rc 8 done}; #right_completed +qx{../src/task rc:remote.rc 8 done 2>&1}; #right_completed sleep 1; -qx{../src/task rc:remote.rc 6 del}; #right_deleted +qx{../src/task rc:remote.rc 6 del 2>&1}; #right_deleted sleep 1; -qx{../src/task rc:remote.rc 3 done}; #left_newer +qx{../src/task rc:remote.rc 3 done 2>&1}; #left_newer sleep 1; # make new local modifications -qx{../src/task rc:local.rc 3 start}; #left_newer +qx{../src/task rc:local.rc 3 start 2>&1}; #left_newer sleep 1; -qx{../src/task rc:local.rc 4 modify +car}; #right_newer +qx{../src/task rc:local.rc 4 modify +car 2>&1}; #right_newer sleep 1; -qx{../src/task rc:local.rc 7 done}; #left_completed +qx{../src/task rc:local.rc 7 done 2>&1}; #left_completed sleep 1; -qx{../src/task rc:local.rc 5 del}; #left_deleted +qx{../src/task rc:local.rc 5 del 2>&1}; #left_deleted sleep 1; # make new remote modifications -qx{../src/task rc:remote.rc 4 modify +gym}; # right_newer +qx{../src/task rc:remote.rc 4 modify +gym 2>&1}; # right_newer # merge remote into local copy ("local/undo.data", "local/undo.save"); -my $output_l = qx{../src/task rc:local.rc merge remote/}; +my $output_l = qx{../src/task rc:local.rc merge remote/ 2>&1}; #check output unlike ($output_l, qr/Missing/, "local-merge: no missing entry"); unlike ($output_l, qr/Not adding duplicate/, "local-merge: no duplicates"); # merge local into remote -my $output_r = qx{../src/task rc:remote.rc merge local/undo.save}; +my $output_r = qx{../src/task rc:remote.rc merge local/undo.save 2>&1}; # check output unlike ($output_r, qr/Missing/, "remote-merge: no missing entry"); unlike ($output_r, qr/Not adding duplicate/, "remote-merge: no duplicates"); # check reports -my $report_l = qx{../src/task rc:local.rc list}; -my $report_r = qx{../src/task rc:remote.rc list}; +my $report_l = qx{../src/task rc:local.rc list 2>&1}; +my $report_r = qx{../src/task rc:remote.rc list 2>&1}; # local-merge like ($report_l, qr/left_added/, "local-merge: left_added is present"); @@ -162,13 +162,13 @@ like ($report_l, qr/H.*left_modified/, "local-merge: left_modif like ($report_l, qr/\*.*left_newer.*stay/, "local-merge: left_newer ok, undo-completed"); like ($report_l, qr/realProject.*right_newer.*gym/, "local-merge: right_newer ok"); -$report_l = qx{../src/task rc:local.rc export}; +$report_l = qx{../src/task rc:local.rc export 2>&1}; like ($report_l, qr/left_deleted.*deleted/, "local-merge: left_deleted ok"); like ($report_l, qr/right_deleted.*deleted/, "local-merge: right_deleted ok"); like ($report_l, qr/left_completed.*completed/, "local-merge: left_completed ok"); like ($report_l, qr/right_completed.*completed/, "local-merge: right_completed ok"); -$report_l = qx(../src/task rc:local.rc waiting); +$report_l = qx{../src/task rc:local.rc waiting 2>&1}; like ($report_l, qr/L.*right_modified/, "local-merge: right_modified ok"); # remote-merge @@ -178,13 +178,13 @@ like ($report_r, qr/H.*left_modified/, "remote-merge: left_modi like ($report_r, qr/\*.*left_newer.*stay/, "remote-merge: left_newer ok"); like ($report_r, qr/realProject.*right_newer.*gym/, "remote-merge: right_newer ok"); -$report_r = qx{../src/task rc:remote.rc export}; +$report_r = qx{../src/task rc:remote.rc export 2>&1}; like ($report_r, qr/left_deleted.*deleted/, "remote-merge: left_deleted ok"); like ($report_r, qr/right_deleted.*deleted/, "remote-merge: right_deleted ok"); like ($report_r, qr/left_completed.*completed/, "remote-merge: left_completed ok"); like ($report_r, qr/right_completed.*completed/, "remote-merge: right_completed ok"); -$report_r = qx(../src/task rc:remote.rc waiting); +$report_r = qx{../src/task rc:remote.rc waiting 2>&1}; like ($report_r, qr/L.*right_modified/, "remote-merge: right_modified ok"); # check timestamps in undo.data diff --git a/test/nag.t b/test/nag.t index dacbe860f..62acc2534 100755 --- a/test/nag.t +++ b/test/nag.t @@ -39,12 +39,12 @@ if (open my $fh, '>', 'nag.rc') ok (-r 'nag.rc', 'Created nag.rc'); } -my $setup = "../src/task rc:nag.rc add due:yesterday one;" - . "../src/task rc:nag.rc add due:tomorrow two;" - . "../src/task rc:nag.rc add priority:H three;" - . "../src/task rc:nag.rc add priority:M four;" - . "../src/task rc:nag.rc add priority:L five;" - . "../src/task rc:nag.rc add six;"; +my $setup = "../src/task rc:nag.rc add due:yesterday one 2>&1;" + . "../src/task rc:nag.rc add due:tomorrow two 2>&1;" + . "../src/task rc:nag.rc add priority:H three 2>&1;" + . "../src/task rc:nag.rc add priority:M four 2>&1;" + . "../src/task rc:nag.rc add priority:L five 2>&1;" + . "../src/task rc:nag.rc add six 2>&1;"; qx{$setup}; like (qx{../src/task rc:nag.rc 6 do 2>&1 >/dev/null}, qr/NAG/, 'do pri: -> nag'); diff --git a/test/next.t b/test/next.t index 1e38d7a4f..ffba8493e 100755 --- a/test/next.t +++ b/test/next.t @@ -41,12 +41,12 @@ if (open my $fh, '>', 'next.rc') # Add two tasks for each of two projects, then run next. There should be only # one task from each project shown. -qx{../src/task rc:next.rc add project:A priority:H AH}; -qx{../src/task rc:next.rc add project:A priority:M AM}; -qx{../src/task rc:next.rc add project:B priority:H BH}; -qx{../src/task rc:next.rc add project:B Bnone}; +qx{../src/task rc:next.rc add project:A priority:H AH 2>&1}; +qx{../src/task rc:next.rc add project:A priority:M AM 2>&1}; +qx{../src/task rc:next.rc add project:B priority:H BH 2>&1}; +qx{../src/task rc:next.rc add project:B Bnone 2>&1}; -my $output = qx{../src/task rc:next.rc next}; +my $output = qx{../src/task rc:next.rc next 2>&1}; like ($output, qr/AH/, 'AH shown'); like ($output, qr/BH/, 'BH shown'); diff --git a/test/oldest.t b/test/oldest.t index 69e24ba61..2e770edc9 100755 --- a/test/oldest.t +++ b/test/oldest.t @@ -39,43 +39,43 @@ if (open my $fh, '>', 'oldest.rc') } # Add 11 tasks. Oldest should show 1-10, newest should show 2-11. -qx{../src/task rc:oldest.rc add one}; +qx{../src/task rc:oldest.rc add one 2>&1}; diag ("3 second delay"); sleep 1; -qx{../src/task rc:oldest.rc add two}; +qx{../src/task rc:oldest.rc add two 2>&1}; sleep 1; -qx{../src/task rc:oldest.rc add three}; +qx{../src/task rc:oldest.rc add three 2>&1}; sleep 1; -my $output = qx{../src/task rc:oldest.rc oldest}; +my $output = qx{../src/task rc:oldest.rc oldest 2>&1}; like ($output, qr/one/, 'oldest: one'); like ($output, qr/two/, 'oldest: two'); like ($output, qr/three/, 'oldest: three'); like ($output, qr/one.*two.*three/ms, 'oldest: sort'); -$output = qx{../src/task rc:oldest.rc newest}; +$output = qx{../src/task rc:oldest.rc newest 2>&1}; like ($output, qr/three/, 'newest: three'); like ($output, qr/two/, 'newest: two'); like ($output, qr/one/, 'newest: one'); like ($output, qr/three.*two.*one/ms, 'newest: sort'); -qx{../src/task rc:oldest.rc add four}; +qx{../src/task rc:oldest.rc add four 2>&1}; diag ("7 second delay"); sleep 1; -qx{../src/task rc:oldest.rc add five}; +qx{../src/task rc:oldest.rc add five 2>&1}; sleep 1; -qx{../src/task rc:oldest.rc add six}; +qx{../src/task rc:oldest.rc add six 2>&1}; sleep 1; -qx{../src/task rc:oldest.rc add seven}; +qx{../src/task rc:oldest.rc add seven 2>&1}; sleep 1; -qx{../src/task rc:oldest.rc add eight}; +qx{../src/task rc:oldest.rc add eight 2>&1}; sleep 1; -qx{../src/task rc:oldest.rc add nine}; +qx{../src/task rc:oldest.rc add nine 2>&1}; sleep 1; -qx{../src/task rc:oldest.rc add ten}; +qx{../src/task rc:oldest.rc add ten 2>&1}; sleep 1; -qx{../src/task rc:oldest.rc add eleven}; +qx{../src/task rc:oldest.rc add eleven 2>&1}; -$output = qx{../src/task rc:oldest.rc oldest}; +$output = qx{../src/task rc:oldest.rc oldest 2>&1}; like ($output, qr/one/, 'oldest: one'); # 10 like ($output, qr/two/, 'oldest: two'); like ($output, qr/three/, 'oldest: three'); @@ -88,7 +88,7 @@ like ($output, qr/nine/, 'oldest: nine'); like ($output, qr/ten/, 'oldest: ten'); unlike ($output, qr/eleven/, 'no: eleven'); # 20 -$output = qx{../src/task rc:oldest.rc oldest limit:3}; +$output = qx{../src/task rc:oldest.rc oldest limit:3 2>&1}; like ($output, qr/one/, 'oldest: one'); like ($output, qr/two/, 'oldest: two'); like ($output, qr/three/, 'oldest: three'); @@ -101,7 +101,7 @@ unlike ($output, qr/nine/, 'no: nine'); unlike ($output, qr/ten/, 'no: ten'); # 30 unlike ($output, qr/eleven/, 'no: eleven'); -$output = qx{../src/task rc:oldest.rc newest}; +$output = qx{../src/task rc:oldest.rc newest 2>&1}; unlike ($output, qr/one/, 'no: one'); like ($output, qr/two/, 'newest: two'); like ($output, qr/three/, 'newest: three'); @@ -114,7 +114,7 @@ like ($output, qr/nine/, 'newest: nine'); # 40 like ($output, qr/ten/, 'newest: ten'); like ($output, qr/eleven/, 'newest: eleven'); -$output = qx{../src/task rc:oldest.rc newest limit:3}; +$output = qx{../src/task rc:oldest.rc newest limit:3 2>&1}; unlike ($output, qr/one/, 'no: one'); unlike ($output, qr/two/, 'no: two'); unlike ($output, qr/three/, 'no: three'); diff --git a/test/op_and.t b/test/op_and.t index 712fb0764..65969a46d 100755 --- a/test/op_and.t +++ b/test/op_and.t @@ -40,43 +40,43 @@ if (open my $fh, '>', 'op.rc') } # Setup: Add a task -qx{../src/task rc:op.rc add one project:A priority:H}; -qx{../src/task rc:op.rc add two project:A }; -qx{../src/task rc:op.rc add three priority:H}; -qx{../src/task rc:op.rc add four }; +qx{../src/task rc:op.rc add one project:A priority:H 2>&1}; +qx{../src/task rc:op.rc add two project:A 2>&1}; +qx{../src/task rc:op.rc add three priority:H 2>&1}; +qx{../src/task rc:op.rc add four 2>&1}; # Test the 'and' operator. -my $output = qx{../src/task rc:op.rc ls project:A priority:H}; +my $output = qx{../src/task rc:op.rc ls project:A priority:H 2>&1}; like ($output, qr/one/, 'ls project:A priority:H --> one'); unlike ($output, qr/two/, 'ls project:A priority:H --> !two'); unlike ($output, qr/three/, 'ls project:A priority:H --> !three'); unlike ($output, qr/four/, 'ls project:A priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project:A and priority:H}; +$output = qx{../src/task rc:op.rc ls project:A and priority:H 2>&1}; like ($output, qr/one/, 'ls project:A priority:H --> one'); unlike ($output, qr/two/, 'ls project:A priority:H --> !two'); unlike ($output, qr/three/, 'ls project:A priority:H --> !three'); unlike ($output, qr/four/, 'ls project:A priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project:A and priority.not:H}; +$output = qx{../src/task rc:op.rc ls project:A and priority.not:H 2>&1}; unlike ($output, qr/one/, 'ls project:A priority:H --> !one'); like ($output, qr/two/, 'ls project:A priority:H --> two'); unlike ($output, qr/three/, 'ls project:A priority:H --> !three'); unlike ($output, qr/four/, 'ls project:A priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project=A priority=H}; +$output = qx{../src/task rc:op.rc ls project=A priority=H 2>&1}; like ($output, qr/one/, 'ls project:A priority:H --> one'); unlike ($output, qr/two/, 'ls project:A priority:H --> !two'); unlike ($output, qr/three/, 'ls project:A priority:H --> !three'); unlike ($output, qr/four/, 'ls project:A priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project=A and priority=H}; +$output = qx{../src/task rc:op.rc ls project=A and priority=H 2>&1}; like ($output, qr/one/, 'ls project:A priority:H --> one'); unlike ($output, qr/two/, 'ls project:A priority:H --> !two'); unlike ($output, qr/three/, 'ls project:A priority:H --> !three'); unlike ($output, qr/four/, 'ls project:A priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project=A and priority!=H}; +$output = qx{../src/task rc:op.rc ls project=A and priority!=H 2>&1}; unlike ($output, qr/one/, 'ls project:A priority:H --> !one'); like ($output, qr/two/, 'ls project:A priority:H --> two'); unlike ($output, qr/three/, 'ls project:A priority:H --> !three'); diff --git a/test/op_gt.t b/test/op_gt.t index bda493826..5cfe9ff51 100755 --- a/test/op_gt.t +++ b/test/op_gt.t @@ -40,37 +40,37 @@ if (open my $fh, '>', 'op.rc') } # Setup: Add a task -qx{../src/task rc:op.rc add one due:yesterday priority:H}; -qx{../src/task rc:op.rc add two due:tomorrow priority:M}; -qx{../src/task rc:op.rc add three priority:L}; -qx{../src/task rc:op.rc add four }; +qx{../src/task rc:op.rc add one due:yesterday priority:H 2>&1}; +qx{../src/task rc:op.rc add two due:tomorrow priority:M 2>&1}; +qx{../src/task rc:op.rc add three priority:L 2>&1}; +qx{../src/task rc:op.rc add four 2>&1}; # Test the '>' operator. -my $output = qx{../src/task rc:op.rc ls due.after:today}; +my $output = qx{../src/task rc:op.rc ls due.after:today 2>&1}; unlike ($output, qr/one/, 'ls due.after:today --> !one'); like ($output, qr/two/, 'ls due.after:today --> two'); unlike ($output, qr/three/, 'ls due.after:today --> !three'); unlike ($output, qr/four/, 'ls due.after:today --> !four'); -$output = qx{../src/task rc:op.rc ls 'due > today'}; +$output = qx{../src/task rc:op.rc ls 'due > today' 2>&1}; unlike ($output, qr/one/, 'ls due > today --> !one'); like ($output, qr/two/, 'ls due > today --> two'); unlike ($output, qr/three/, 'ls due > today --> !three'); unlike ($output, qr/four/, 'ls due > today --> !four'); -$output = qx{../src/task rc:op.rc ls priority.above:L}; +$output = qx{../src/task rc:op.rc ls priority.above:L 2>&1}; like ($output, qr/one/, 'ls priority.above:L --> one'); like ($output, qr/two/, 'ls priority.above:L --> two'); unlike ($output, qr/three/, 'ls priority.above:L --> !three'); unlike ($output, qr/four/, 'ls priority.above:L --> !four'); -$output = qx{../src/task rc:op.rc ls 'priority > L'}; +$output = qx{../src/task rc:op.rc ls 'priority > L' 2>&1}; like ($output, qr/one/, 'ls priority > L --> one'); like ($output, qr/two/, 'ls priority > L --> two'); unlike ($output, qr/three/, 'ls priority > L --> !three'); unlike ($output, qr/four/, 'ls priority > L --> !four'); -$output = qx{../src/task rc:op.rc ls 'description > t'}; +$output = qx{../src/task rc:op.rc ls 'description > t' 2>&1}; unlike ($output, qr/one/, 'ls description > t --> !one'); like ($output, qr/two/, 'ls description > t --> two'); like ($output, qr/three/, 'ls description > t --> three'); diff --git a/test/op_gte.t b/test/op_gte.t index 8c624a18f..b56d62741 100755 --- a/test/op_gte.t +++ b/test/op_gte.t @@ -40,19 +40,19 @@ if (open my $fh, '>', 'op.rc') } # Setup: Add a task -qx{../src/task rc:op.rc add one priority:H}; -qx{../src/task rc:op.rc add two priority:M}; -qx{../src/task rc:op.rc add three priority:L}; -qx{../src/task rc:op.rc add four }; +qx{../src/task rc:op.rc add one priority:H 2>&1}; +qx{../src/task rc:op.rc add two priority:M 2>&1}; +qx{../src/task rc:op.rc add three priority:L 2>&1}; +qx{../src/task rc:op.rc add four 2>&1}; # Test the '>=' operator. -my $output = qx{../src/task rc:op.rc ls 'priority >= M'}; +my $output = qx{../src/task rc:op.rc ls 'priority >= M' 2>&1}; like ($output, qr/one/, 'ls priority >= M --> one'); like ($output, qr/two/, 'ls priority >= M --> two'); unlike ($output, qr/three/, 'ls priority >= M --> !three'); unlike ($output, qr/four/, 'ls priority >= M --> !four'); -$output = qx{../src/task rc:op.rc ls 'description >= t'}; +$output = qx{../src/task rc:op.rc ls 'description >= t' 2>&1}; unlike ($output, qr/one/, 'ls description >= t --> !one'); like ($output, qr/two/, 'ls description >= t --> two'); like ($output, qr/three/, 'ls description >= t --> three'); diff --git a/test/op_lt.t b/test/op_lt.t index 918bbddc4..6e65f7103 100755 --- a/test/op_lt.t +++ b/test/op_lt.t @@ -40,37 +40,37 @@ if (open my $fh, '>', 'op.rc') } # Setup: Add a task -qx{../src/task rc:op.rc add one due:yesterday priority:H}; -qx{../src/task rc:op.rc add two due:tomorrow priority:M}; -qx{../src/task rc:op.rc add three priority:L}; -qx{../src/task rc:op.rc add four }; +qx{../src/task rc:op.rc add one due:yesterday priority:H 2>&1}; +qx{../src/task rc:op.rc add two due:tomorrow priority:M 2>&1}; +qx{../src/task rc:op.rc add three priority:L 2>&1}; +qx{../src/task rc:op.rc add four 2>&1}; # Test the '<' operator. -my $output = qx{../src/task rc:op.rc ls due.before:today}; +my $output = qx{../src/task rc:op.rc ls due.before:today 2>&1}; like ($output, qr/one/, 'ls due.before:today --> one'); unlike ($output, qr/two/, 'ls due.before:today --> !two'); unlike ($output, qr/three/, 'ls due.before:today --> !three'); unlike ($output, qr/four/, 'ls due.before:today --> !four'); -$output = qx{../src/task rc:op.rc ls 'due < today'}; +$output = qx{../src/task rc:op.rc ls 'due < today' 2>&1}; like ($output, qr/one/, 'ls due < today --> one'); unlike ($output, qr/two/, 'ls due < today --> !two'); unlike ($output, qr/three/, 'ls due < today --> !three'); unlike ($output, qr/four/, 'ls due < today --> !four'); -$output = qx{../src/task rc:op.rc ls priority.below:H}; +$output = qx{../src/task rc:op.rc ls priority.below:H 2>&1}; unlike ($output, qr/one/, 'ls priority.below:H --> !one'); like ($output, qr/two/, 'ls priority.below:H --> two'); like ($output, qr/three/, 'ls priority.below:H --> three'); like ($output, qr/four/, 'ls priority.below:H --> four'); -$output = qx{../src/task rc:op.rc ls 'priority < H'}; +$output = qx{../src/task rc:op.rc ls 'priority < H' 2>&1}; unlike ($output, qr/one/, 'ls priority < H --> !one'); like ($output, qr/two/, 'ls priority < H --> two'); like ($output, qr/three/, 'ls priority < H --> three'); like ($output, qr/four/, 'ls priority < H --> four'); -$output = qx{../src/task rc:op.rc ls 'description < t'}; +$output = qx{../src/task rc:op.rc ls 'description < t' 2>&1}; like ($output, qr/one/, 'ls description < t --> one'); unlike ($output, qr/two/, 'ls description < t --> !two'); unlike ($output, qr/three/, 'ls description < t --> !three'); diff --git a/test/op_lte.t b/test/op_lte.t index 981c19021..c9e9904e2 100755 --- a/test/op_lte.t +++ b/test/op_lte.t @@ -40,19 +40,19 @@ if (open my $fh, '>', 'op.rc') } # Setup: Add a task -qx{../src/task rc:op.rc add one priority:H}; -qx{../src/task rc:op.rc add two priority:M}; -qx{../src/task rc:op.rc add three priority:L}; -qx{../src/task rc:op.rc add four }; +qx{../src/task rc:op.rc add one priority:H 2>&1}; +qx{../src/task rc:op.rc add two priority:M 2>&1}; +qx{../src/task rc:op.rc add three priority:L 2>&1}; +qx{../src/task rc:op.rc add four 2>&1}; # Test the '<=' operator. -my $output = qx{../src/task rc:op.rc ls 'priority <= M'}; +my $output = qx{../src/task rc:op.rc ls 'priority <= M' 2>&1}; unlike ($output, qr/one/, 'ls priority <= H --> !one'); like ($output, qr/two/, 'ls priority <= H --> two'); like ($output, qr/three/, 'ls priority <= H --> three'); like ($output, qr/four/, 'ls priority <= H --> four'); -$output = qx{../src/task rc:op.rc ls 'description <= t'}; +$output = qx{../src/task rc:op.rc ls 'description <= t' 2>&1}; like ($output, qr/one/, 'ls description <= t --> one'); unlike ($output, qr/two/, 'ls description <= t --> !two'); unlike ($output, qr/three/, 'ls description <= t --> !three'); diff --git a/test/op_or.t b/test/op_or.t index 6240a9b2a..dac1ea040 100755 --- a/test/op_or.t +++ b/test/op_or.t @@ -40,31 +40,31 @@ if (open my $fh, '>', 'op.rc') } # Setup: Add a task -qx{../src/task rc:op.rc add one project:A priority:H}; -qx{../src/task rc:op.rc add two project:A }; -qx{../src/task rc:op.rc add three priority:H}; -qx{../src/task rc:op.rc add four }; +qx{../src/task rc:op.rc add one project:A priority:H 2>&1}; +qx{../src/task rc:op.rc add two project:A 2>&1}; +qx{../src/task rc:op.rc add three priority:H 2>&1}; +qx{../src/task rc:op.rc add four 2>&1}; # Test the 'or' operator. -my $output = qx{../src/task rc:op.rc ls project:A or priority:H}; +my $output = qx{../src/task rc:op.rc ls project:A or priority:H 2>&1}; like ($output, qr/one/, 'ls project:A or priority:H --> one'); like ($output, qr/two/, 'ls project:A or priority:H --> two'); like ($output, qr/three/, 'ls project:A or priority:H --> three'); unlike ($output, qr/four/, 'ls project:A or priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project:A or priority=H}; +$output = qx{../src/task rc:op.rc ls project:A or priority=H 2>&1}; like ($output, qr/one/, 'ls project:A or priority=H --> one'); like ($output, qr/two/, 'ls project:A or priority=H --> two'); like ($output, qr/three/, 'ls project:A or priority=H --> three'); unlike ($output, qr/four/, 'ls project:A or priority=H --> !four'); -$output = qx{../src/task rc:op.rc ls project=A or priority:H}; +$output = qx{../src/task rc:op.rc ls project=A or priority:H 2>&1}; like ($output, qr/one/, 'ls project=A or priority:H --> one'); like ($output, qr/two/, 'ls project=A or priority:H --> two'); like ($output, qr/three/, 'ls project=A or priority:H --> three'); unlike ($output, qr/four/, 'ls project=A or priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project=A or priority=H}; +$output = qx{../src/task rc:op.rc ls project=A or priority=H 2>&1}; like ($output, qr/one/, 'ls project=A or priority=H --> one'); like ($output, qr/two/, 'ls project=A or priority=H --> two'); like ($output, qr/three/, 'ls project=A or priority=H --> three'); diff --git a/test/op_xor.t b/test/op_xor.t index 01f60cc66..68ee97573 100755 --- a/test/op_xor.t +++ b/test/op_xor.t @@ -40,31 +40,31 @@ if (open my $fh, '>', 'op.rc') } # Setup: Add a task -qx{../src/task rc:op.rc add one project:A priority:H}; -qx{../src/task rc:op.rc add two project:A }; -qx{../src/task rc:op.rc add three priority:H}; -qx{../src/task rc:op.rc add four }; +qx{../src/task rc:op.rc add one project:A priority:H 2>&1}; +qx{../src/task rc:op.rc add two project:A 2>&1}; +qx{../src/task rc:op.rc add three priority:H 2>&1}; +qx{../src/task rc:op.rc add four 2>&1}; # Test the 'xor' operator. -my $output = qx{../src/task rc:op.rc ls project:A xor priority:H}; +my $output = qx{../src/task rc:op.rc ls project:A xor priority:H 2>&1}; unlike ($output, qr/one/, 'ls project:A priority:H --> !one'); like ($output, qr/two/, 'ls project:A priority:H --> two'); like ($output, qr/three/, 'ls project:A priority:H --> three'); unlike ($output, qr/four/, 'ls project:A priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project:A xor priority=H}; +$output = qx{../src/task rc:op.rc ls project:A xor priority=H 2>&1}; unlike ($output, qr/one/, 'ls project:A priority=H --> !one'); like ($output, qr/two/, 'ls project:A priority=H --> two'); like ($output, qr/three/, 'ls project:A priority=H --> three'); unlike ($output, qr/four/, 'ls project:A priority=H --> !four'); -$output = qx{../src/task rc:op.rc ls project=A xor priority:H}; +$output = qx{../src/task rc:op.rc ls project=A xor priority:H 2>&1}; unlike ($output, qr/one/, 'ls project=A priority:H --> !one'); like ($output, qr/two/, 'ls project=A priority:H --> two'); like ($output, qr/three/, 'ls project=A priority:H --> three'); unlike ($output, qr/four/, 'ls project=A priority:H --> !four'); -$output = qx{../src/task rc:op.rc ls project=A xor priority=H}; +$output = qx{../src/task rc:op.rc ls project=A xor priority=H 2>&1}; unlike ($output, qr/one/, 'ls project=A priority=H --> !one'); like ($output, qr/two/, 'ls project=A priority=H --> two'); like ($output, qr/three/, 'ls project=A priority=H --> three'); diff --git a/test/overdue.t b/test/overdue.t index ea58345f5..3a5f38c24 100755 --- a/test/overdue.t +++ b/test/overdue.t @@ -41,10 +41,10 @@ if (open my $fh, '>', 'due.rc') # Add an overdue task, a due task, and a regular task. The "overdue" report # should list only the one task. -qx{../src/task rc:due.rc add due:yesterday one}; -qx{../src/task rc:due.rc add due:tomorrow two}; -qx{../src/task rc:due.rc add due:eoy three}; -my $output = qx{../src/task rc:due.rc overdue}; +qx{../src/task rc:due.rc add due:yesterday one 2>&1}; +qx{../src/task rc:due.rc add due:tomorrow two 2>&1}; +qx{../src/task rc:due.rc add due:eoy three 2>&1}; +my $output = qx{../src/task rc:due.rc overdue 2>&1}; like ($output, qr/one/, 'overdue: task 1 shows up'); unlike ($output, qr/two/, 'overdue: task 2 does not show up'); unlike ($output, qr/three/, 'overdue: task 3 does not show up'); diff --git a/test/override.t b/test/override.t index 20d92ee68..f871820a0 100755 --- a/test/override.t +++ b/test/override.t @@ -45,9 +45,9 @@ if (open my $fh, '>', 'or.rc') # The zzz report is defined with an override in the filter that contradicts # the value in the rc. The filter override should prevail. -qx{../src/task rc:or.rc add ONE}; -qx{../src/task rc:or.rc 1 annotate TWO}; -my $output = qx{../src/task rc:or.rc zzz}; +qx{../src/task rc:or.rc add ONE 2>&1}; +qx{../src/task rc:or.rc 1 annotate TWO 2>&1}; +my $output = qx{../src/task rc:or.rc zzz 2>&1}; like ($output, qr/ONE.+TWO/ms, 'filter override > rc setting'); # Cleanup. diff --git a/test/prepend.t b/test/prepend.t index c40c6a7de..5f82ced5b 100755 --- a/test/prepend.t +++ b/test/prepend.t @@ -39,13 +39,13 @@ if (open my $fh, '>', 'prepend.rc') } # Add a task, then prepend more decsription. -qx{../src/task rc:prepend.rc add bar}; -qx{../src/task rc:prepend.rc 1 prepend foo}; -my $output = qx{../src/task rc:prepend.rc info 1}; +qx{../src/task rc:prepend.rc add bar 2>&1}; +qx{../src/task rc:prepend.rc 1 prepend foo 2>&1}; +my $output = qx{../src/task rc:prepend.rc info 1 2>&1}; like ($output, qr/Description\s+foo\sbar\n/, 'prepend worked'); # Should cause an error when nothing is appended. -$output = qx{../src/task rc:prepend.rc 1 prepend}; +$output = qx{../src/task rc:prepend.rc 1 prepend 2>&1}; unlike ($output, qr/Prepended 0 tasks/, 'blank prepend failed'); # Cleanup. diff --git a/test/pri_sort.t b/test/pri_sort.t index 67430f161..2893c5b06 100755 --- a/test/pri_sort.t +++ b/test/pri_sort.t @@ -39,54 +39,54 @@ if (open my $fh, '>', 'pri.rc') } # Verify that priorities can be select with the 'over' and 'under' modifiers. -qx{../src/task rc:pri.rc add H pri:H}; -qx{../src/task rc:pri.rc add M pri:M}; -qx{../src/task rc:pri.rc add L pri:L}; -qx{../src/task rc:pri.rc add _}; +qx{../src/task rc:pri.rc add H pri:H 2>&1}; +qx{../src/task rc:pri.rc add M pri:M 2>&1}; +qx{../src/task rc:pri.rc add L pri:L 2>&1}; +qx{../src/task rc:pri.rc add _ 2>&1}; -my $output = qx{../src/task rc:pri.rc ls priority.under:H}; +my $output = qx{../src/task rc:pri.rc ls priority.under:H 2>&1}; unlike ($output, qr/H/, 'pri H !< H'); like ($output, qr/M/, 'pri M < H'); like ($output, qr/L/, 'pri L < H'); like ($output, qr/_/, 'pri _ < H'); -$output = qx{../src/task rc:pri.rc ls priority.under:M}; +$output = qx{../src/task rc:pri.rc ls priority.under:M 2>&1}; unlike ($output, qr/H/, 'pri H !< M'); unlike ($output, qr/M/, 'pri M !< M'); like ($output, qr/L/, 'pri L < M'); like ($output, qr/_/, 'pri _ < M'); -$output = qx{../src/task rc:pri.rc ls priority.under:L}; +$output = qx{../src/task rc:pri.rc ls priority.under:L 2>&1}; unlike ($output, qr/H/, 'pri H !< L'); unlike ($output, qr/M/, 'pri M !< L'); unlike ($output, qr/L/, 'pri L !< L'); like ($output, qr/_/, 'pri _ < L'); -$output = qx{../src/task rc:pri.rc ls priority.under:}; +$output = qx{../src/task rc:pri.rc ls priority.under: 2>&1}; unlike ($output, qr/H/, 'pri H !< _'); unlike ($output, qr/M/, 'pri M !< _'); unlike ($output, qr/L/, 'pri L !< _'); unlike ($output, qr/_/, 'pri _ !< _'); -$output = qx{../src/task rc:pri.rc ls priority.over:H}; +$output = qx{../src/task rc:pri.rc ls priority.over:H 2>&1}; unlike ($output, qr/H/, 'pri H !> H'); unlike ($output, qr/M/, 'pri M !> H'); unlike ($output, qr/L/, 'pri L !> H'); unlike ($output, qr/_/, 'pri _ !> H'); -$output = qx{../src/task rc:pri.rc ls priority.over:M}; +$output = qx{../src/task rc:pri.rc ls priority.over:M 2>&1}; like ($output, qr/H/, 'pri H > M'); unlike ($output, qr/M/, 'pri M !> M'); unlike ($output, qr/L/, 'pri L !> M'); unlike ($output, qr/_/, 'pri _ !> M'); -$output = qx{../src/task rc:pri.rc ls priority.over:L}; +$output = qx{../src/task rc:pri.rc ls priority.over:L 2>&1}; like ($output, qr/H/, 'pri H > L'); like ($output, qr/M/, 'pri M > L'); unlike ($output, qr/L/, 'pri L !> L'); unlike ($output, qr/_/, 'pri _ !> L'); -$output = qx{../src/task rc:pri.rc ls priority.over:}; +$output = qx{../src/task rc:pri.rc ls priority.over: 2>&1}; like ($output, qr/H/, 'pri H > _'); like ($output, qr/M/, 'pri M > _'); like ($output, qr/L/, 'pri L > _'); diff --git a/test/rc.override.t b/test/rc.override.t index 1d7a7c8e1..5409a986f 100755 --- a/test/rc.override.t +++ b/test/rc.override.t @@ -39,10 +39,10 @@ if (open my $fh, '>', 'rc.rc') ok (-r 'rc.rc', 'Created rc.rc'); } -my $output = qx{../src/task rc:rc.rc show}; +my $output = qx{../src/task rc:rc.rc show 2>&1}; like ($output, qr/^.*foo.+bar.*$/m, 'unmodified'); -$output = qx{../src/task rc:rc.rc rc.foo:baz show}; +$output = qx{../src/task rc:rc.rc rc.foo:baz show 2>&1}; like ($output, qr/^.*foo.*baz.*$/m, 'overridden'); unlink 'rc.rc'; diff --git a/test/rc.t b/test/rc.t index cb97b83cd..025493905 100755 --- a/test/rc.t +++ b/test/rc.t @@ -34,7 +34,7 @@ use Test::More tests => 15; # Create the rc file, using rc.name:value. unlink 'foo.rc'; rmtree 'foo', 0, 0; -qx{echo 'y'|../src/task rc:foo.rc rc.data.location:foo}; +qx{echo 'y'|../src/task rc:foo.rc rc.data.location:foo 2>&1}; ok (-r 'foo.rc', 'Created default rc file'); ok (-d 'foo', 'Created default data directory'); @@ -46,41 +46,41 @@ unlink 'foo.rc'; ok (!-r 'foo.rc', 'Removed foo.rc'); # Do it all again, with rc.name=value. -qx{echo 'y'|../src/task rc:foo.rc rc.data.location:foo}; +qx{echo 'y'|../src/task rc:foo.rc rc.data.location:foo 2>&1}; ok (-r 'foo.rc', 'Created default rc file'); ok (-d 'foo', 'Created default data directory'); # Add a setting. -qx{echo 'y'|../src/task rc:foo.rc config must_be_unique old}; -my $output = qx{../src/task rc:foo.rc show}; +qx{echo 'y'|../src/task rc:foo.rc config must_be_unique old 2>&1}; +my $output = qx{../src/task rc:foo.rc show 2>&1}; like ($output, qr/^must_be_unique\s+old/ms, 'config setting a new value'); -qx{echo 'y'|../src/task rc:foo.rc config must_be_unique new}; -$output = qx{../src/task rc:foo.rc show}; +qx{echo 'y'|../src/task rc:foo.rc config must_be_unique new 2>&1}; +$output = qx{../src/task rc:foo.rc show 2>&1}; like ($output, qr/^must_be_unique\s+new/ms, 'config overwriting an existing value'); -qx{echo 'y'|../src/task rc:foo.rc config must_be_unique ''}; -$output = qx{../src/task rc:foo.rc show}; +qx{echo 'y'|../src/task rc:foo.rc config must_be_unique '' 2>&1}; +$output = qx{../src/task rc:foo.rc show 2>&1}; like ($output, qr/^must_be_unique/ms, 'config setting a blank value'); -qx{echo 'y'|../src/task rc:foo.rc config must_be_unique}; -$output = qx{../src/task rc:foo.rc show}; +qx{echo 'y'|../src/task rc:foo.rc config must_be_unique 2>&1}; +$output = qx{../src/task rc:foo.rc show 2>&1}; unlike ($output, qr/^must_be_unique/ms, 'config removing a value'); # 'report.:b' is designed to get past the config command checks for recognized # names. -qx{echo 'y'|../src/task rc:foo.rc config -- report.:b +c}; -$output = qx{../src/task rc:foo.rc show}; +qx{echo 'y'|../src/task rc:foo.rc config -- report.:b +c 2>&1}; +$output = qx{../src/task rc:foo.rc show 2>&1}; like ($output, qr/^report\.:b\s+\+c/ms, 'the -- operator is working'); # Make sure the value is accepted if it has multiple words. -qx{echo 'y'|../src/task rc:foo.rc config must_be_unique 'one two three'}; -$output = qx{../src/task rc:foo.rc show}; +qx{echo 'y'|../src/task rc:foo.rc config must_be_unique 'one two three' 2>&1}; +$output = qx{../src/task rc:foo.rc show 2>&1}; like ($output, qr/^must_be_unique\s+one two three/ms, 'config allows multi-word quoted values'); -qx{echo 'y'|../src/task rc:foo.rc config must_be_unique one two three}; -$output = qx{../src/task rc:foo.rc show}; +qx{echo 'y'|../src/task rc:foo.rc config must_be_unique one two three 2>&1}; +$output = qx{../src/task rc:foo.rc show 2>&1}; like ($output, qr/^must_be_unique\s+one two three/ms, 'config allows multi-word unquoted values'); rmtree 'foo', 0, 0; diff --git a/test/recur.limit.t b/test/recur.limit.t index b0e610916..c51403af5 100755 --- a/test/recur.limit.t +++ b/test/recur.limit.t @@ -41,16 +41,16 @@ if (open my $fh, '>', 'recur.rc') # Add a recurring task, then see how many future pending tasks are # generated by default, and by overriding rc.recurrence.limit. -qx{../src/task rc:recur.rc add ONE due:tomorrow recur:weekly}; -my $output = qx{../src/task rc:recur.rc long}; +qx{../src/task rc:recur.rc add ONE due:tomorrow recur:weekly 2>&1}; +my $output = qx{../src/task rc:recur.rc long 2>&1}; my @tasks = $output =~ /(ONE)/g; is (scalar @tasks, 1, 'recurrence.limit default to 1'); -$output = qx{../src/task rc:recur.rc rc.recurrence.limit:4 long}; +$output = qx{../src/task rc:recur.rc rc.recurrence.limit:4 long 2>&1}; @tasks = $output =~ /(ONE)/g; is (scalar @tasks, 4, 'recurrence.limit override to 4'); -$output = qx{../src/task rc:recur.rc diag}; +$output = qx{../src/task rc:recur.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/recur.sort.t b/test/recur.sort.t index f0baff811..8b32b4543 100755 --- a/test/recur.sort.t +++ b/test/recur.sort.t @@ -43,17 +43,17 @@ if (open my $fh, '>', 'recur.rc') } # Create a few recurring tasks, and test the sort order of the recur column. -qx{../src/task rc:recur.rc add due:tomorrow recur:daily first}; -qx{../src/task rc:recur.rc add due:tomorrow recur:weekly second}; -qx{../src/task rc:recur.rc add due:tomorrow recur:3d third}; +qx{../src/task rc:recur.rc add due:tomorrow recur:daily first 2>&1}; +qx{../src/task rc:recur.rc add due:tomorrow recur:weekly second 2>&1}; +qx{../src/task rc:recur.rc add due:tomorrow recur:3d third 2>&1}; -my $output = qx{../src/task rc:recur.rc asc}; +my $output = qx{../src/task rc:recur.rc asc 2>&1}; like ($output, qr/first .* third .* second/msx, 'daily 3d weekly'); -$output = qx{../src/task rc:recur.rc desc}; +$output = qx{../src/task rc:recur.rc desc 2>&1}; like ($output, qr/second .* third .* first/msx, 'weekly 3d daily'); -$output = qx{../src/task rc:recur.rc diag}; +$output = qx{../src/task rc:recur.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/recur.t b/test/recur.t index d74535dd1..615221c02 100755 --- a/test/recur.t +++ b/test/recur.t @@ -41,45 +41,45 @@ if (open my $fh, '>', 'recur.rc') } # Create a recurring and non-recurring task. -qx{../src/task rc:recur.rc add simple}; -qx{../src/task rc:recur.rc add complex due:today recur:daily}; +qx{../src/task rc:recur.rc add simple 2>&1}; +qx{../src/task rc:recur.rc add complex due:today recur:daily 2>&1}; # List tasks to generate child tasks. Should result in: # 1 simple # 3 complex # 4 complex -my $output = qx{../src/task rc:recur.rc minimal}; +my $output = qx{../src/task rc:recur.rc minimal 2>&1}; like ($output, qr/1.+simple\n/ms, '1 simple'); like ($output, qr/3.+complex\n/ms, '3 complex'); like ($output, qr/4.+complex\n/ms, '4 complex'); # Modify a child task and do not propagate the change. -$output = qx{echo 'n' | ../src/task rc:recur.rc 3 modify complex2}; -$output = qx{../src/task rc:recur.rc 3 info}; +$output = qx{echo 'n' | ../src/task rc:recur.rc 3 modify complex2 2>&1}; +$output = qx{../src/task rc:recur.rc 3 info 2>&1}; like ($output, qr/Description\s+complex2\s/ms, '3 modified'); -$output = qx{../src/task rc:recur.rc 4 info}; +$output = qx{../src/task rc:recur.rc 4 info 2>&1}; like ($output, qr/Description\s+complex\s/ms, '4 not modified'); # Modify a child task and propagate the change. -$output = qx{echo 'y' | ../src/task rc:recur.rc 3 modify complex3}; -$output = qx{../src/task rc:recur.rc 3 info}; +$output = qx{echo 'y' | ../src/task rc:recur.rc 3 modify complex3 2>&1}; +$output = qx{../src/task rc:recur.rc 3 info 2>&1}; like ($output, qr/Description\s+complex3\s/ms, '3 modified'); -$output = qx{../src/task rc:recur.rc 4 info}; +$output = qx{../src/task rc:recur.rc 4 info 2>&1}; like ($output, qr/Description\s+complex3\s/ms, '4 not modified'); # Delete a child task, not propagate. -$output = qx{echo 'n' | ../src/task rc:recur.rc 3 delete}; +$output = qx{echo 'n' | ../src/task rc:recur.rc 3 delete 2>&1}; like ($output, qr/Deleted 1 task\./, '3 deleted'); # Delete a child task, propagate. -#$output = qx{../src/task rc:recur.rc minimal}; -#$output = qx{echo 'y' | ../src/task rc:recur.rc 3 delete}; +#$output = qx{../src/task rc:recur.rc minimal 2>&1}; +#$output = qx{echo 'y' | ../src/task rc:recur.rc 3 delete 2>&1}; #like ($output, qr/Deleted 1 task\./, 'Child + parent deleted'); -#$output = qx{../src/task rc:recur.rc minimal}; +#$output = qx{../src/task rc:recur.rc minimal 2>&1}; # TODO Delete a recurring task. -#$output = qx{echo 'y' | ../src/task rc:recur.rc 4 delete}; +#$output = qx{echo 'y' | ../src/task rc:recur.rc 4 delete 2>&1}; #diag ('---'); #diag ($output); #diag ('---'); @@ -90,7 +90,7 @@ like ($output, qr/Deleted 1 task\./, '3 deleted'); # TODO Duplicate a recurring child task # TODO Duplicate a recurring parent task -$output = qx{../src/task rc:recur.rc diag}; +$output = qx{../src/task rc:recur.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/recur.until.t b/test/recur.until.t index c627a362c..3143721d6 100755 --- a/test/recur.until.t +++ b/test/recur.until.t @@ -39,23 +39,23 @@ if (open my $fh, '>', 'recur.rc') } # Create a few recurring tasks, and test the sort order of the recur column. -qx{../src/task rc:recur.rc add foo due:now recur:2sec until:5sec}; +qx{../src/task rc:recur.rc add foo due:now recur:2sec until:5sec 2>&1}; diag ("Sleeping for 6 seconds"); sleep 6; -my $output = qx{../src/task rc:recur.rc list}; +my $output = qx{../src/task rc:recur.rc list 2>&1}; like ($output, qr/^\s+2/ms, 'Found 2'); like ($output, qr/^\s+3/ms, 'Found 3'); like ($output, qr/^\s+4/ms, 'Found 4'); like ($output, qr/^\s+5/ms, 'Found 5'); -qx{../src/task rc:recur.rc 2 do}; -qx{../src/task rc:recur.rc 3 do}; -qx{../src/task rc:recur.rc 4 do}; -qx{../src/task rc:recur.rc 5 do}; +qx{../src/task rc:recur.rc 2 do 2>&1}; +qx{../src/task rc:recur.rc 3 do 2>&1}; +qx{../src/task rc:recur.rc 4 do 2>&1}; +qx{../src/task rc:recur.rc 5 do 2>&1}; $output = qx{../src/task rc:recur.rc list 2>&1 >/dev/null}; like ($output, qr/and was deleted/, 'Parent task deleted'); -$output = qx{../src/task rc:recur.rc diag}; +$output = qx{../src/task rc:recur.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/recur.weekdays.t b/test/recur.weekdays.t index 076e715a6..133756a70 100755 --- a/test/recur.weekdays.t +++ b/test/recur.weekdays.t @@ -39,17 +39,17 @@ if (open my $fh, '>', 'recur.rc') } # Create a few recurring tasks, and test the sort order of the recur column. -qx{../src/task rc:recur.rc add due:friday recur:weekdays one}; -my $output = qx{../src/task rc:recur.rc list}; +qx{../src/task rc:recur.rc add due:friday recur:weekdays one 2>&1}; +my $output = qx{../src/task rc:recur.rc list 2>&1}; like ($output, qr/one/, 'recur weekdays'); -$output = qx{../src/task rc:recur.rc info 1}; +$output = qx{../src/task rc:recur.rc info 1 2>&1}; like ($output, qr/Recurrence\s+weekdays/, 'task recurs every weekday'); -qx{../src/task rc:recur.rc 1 do}; -$output = qx{../src/task rc:recur.rc list}; +qx{../src/task rc:recur.rc 1 do 2>&1}; +$output = qx{../src/task rc:recur.rc list 2>&1}; -$output = qx{../src/task rc:recur.rc diag}; +$output = qx{../src/task rc:recur.rc diag 2>&1}; like ($output, qr/No duplicates found/, 'No duplicate UUIDs detected'); # Cleanup. diff --git a/test/roundtrip.t b/test/roundtrip.t index 32f2b7242..ad1357942 100755 --- a/test/roundtrip.t +++ b/test/roundtrip.t @@ -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'); diff --git a/test/sequence.t b/test/sequence.t index 78a190549..393c2d718 100755 --- a/test/sequence.t +++ b/test/sequence.t @@ -40,81 +40,81 @@ if (open my $fh, '>', 'seq.rc') } # Test sequences in done/undo -qx{../src/task rc:seq.rc add one mississippi}; -qx{../src/task rc:seq.rc add two mississippi}; -qx{../src/task rc:seq.rc 1,2 do}; -my $output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc add one mississippi 2>&1}; +qx{../src/task rc:seq.rc add two mississippi 2>&1}; +qx{../src/task rc:seq.rc 1,2 do 2>&1}; +my $output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/Status\s+Completed/, 'sequence do 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/Status\s+Completed/, 'sequence do 2'); -qx{../src/task rc:seq.rc undo}; -qx{../src/task rc:seq.rc undo}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc undo 2>&1}; +qx{../src/task rc:seq.rc undo 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/Status\s+Pending/, 'sequence undo 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/Status\s+Pending/, 'sequence undo 2'); # Test sequences in delete/undelete -qx{../src/task rc:seq.rc 1,2 delete}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc 1,2 delete 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/Status\s+Deleted/, 'sequence delete 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/Status\s+Deleted/, 'sequence delete 2'); -qx{../src/task rc:seq.rc undo}; -qx{../src/task rc:seq.rc undo}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc undo 2>&1}; +qx{../src/task rc:seq.rc undo 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/Status\s+Pending/, 'sequence undo 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/Status\s+Pending/, 'sequence undo 2'); # Test sequences in start/stop -qx{../src/task rc:seq.rc 1,2 start}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc 1,2 start 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/Start/, 'sequence start 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/Start/, 'sequence start 2'); -qx{../src/task rc:seq.rc 1,2 stop}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc 1,2 stop 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/Start\sdeleted/, 'sequence stop 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/Start\sdeleted/, 'sequence stop 2'); # Test sequences in modify -qx{../src/task rc:seq.rc 1,2 modify +tag}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc 1,2 modify +tag 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/Tags\s+tag/, 'sequence modify 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/Tags\s+tag/, 'sequence modify 2'); -qx{../src/task rc:seq.rc 1,2 modify -tag}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc 1,2 modify -tag 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; unlike ($output, qr/Tags\s+tag/, 'sequence unmodify 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; unlike ($output, qr/Tags\s+tag/, 'sequence unmodify 2'); # Test sequences in substitutions -qx{../src/task rc:seq.rc 1,2 modify /miss/Miss/}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc 1,2 modify /miss/Miss/ 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/Description\s+one Miss/, 'sequence substitution 1'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/Description\s+two Miss/, 'sequence substitution 2'); # Test sequences in info -$output = qx{../src/task rc:seq.rc info 1,2}; +$output = qx{../src/task rc:seq.rc info 1,2 2>&1}; like ($output, qr/Description\s+one Miss/, 'sequence info 1'); like ($output, qr/Description\s+two Miss/, 'sequence info 2'); # Test sequences in duplicate -qx{../src/task rc:seq.rc 1,2 duplicate pri:H}; -$output = qx{../src/task rc:seq.rc info 3}; +qx{../src/task rc:seq.rc 1,2 duplicate pri:H 2>&1}; +$output = qx{../src/task rc:seq.rc info 3 2>&1}; like ($output, qr/Priority\s+H/, 'sequence duplicate 1'); -$output = qx{../src/task rc:seq.rc info 4}; +$output = qx{../src/task rc:seq.rc info 4 2>&1}; like ($output, qr/Priority\s+H/, 'sequence duplicate 2'); # Test sequences in annotate -qx{../src/task rc:seq.rc 1,2 annotate note}; -$output = qx{../src/task rc:seq.rc info 1}; +qx{../src/task rc:seq.rc 1,2 annotate note 2>&1}; +$output = qx{../src/task rc:seq.rc info 1 2>&1}; like ($output, qr/\d+\/\d+\/\d+ note/, 'sequence 1 annotate'); -$output = qx{../src/task rc:seq.rc info 2}; +$output = qx{../src/task rc:seq.rc info 2 2>&1}; like ($output, qr/\d+\/\d+\/\d+ note/, 'sequence 2 annotate'); # Cleanup. diff --git a/test/shell.t b/test/shell.t index 87e5149a5..f64fe8b92 100755 --- a/test/shell.t +++ b/test/shell.t @@ -42,12 +42,12 @@ if (open my $fh, '>', 'shell.rc') } # Test the prompt. -my $output = qx{echo "quit" | ../src/task rc:shell.rc shell}; +my $output = qx{echo "quit" | ../src/task rc:shell.rc shell 2>&1}; like ($output, qr/testprompt>/, 'custom prompt is being used'); # Test a simple add, then info. -qx{echo "add foo" | ../src/task rc:shell.rc shell}; -$output = qx{echo "1 info" | ../src/task rc:shell.rc shell}; +qx{echo "add foo" | ../src/task rc:shell.rc shell 2>&1}; +$output = qx{echo "1 info" | ../src/task rc:shell.rc shell 2>&1}; like ($output, qr/Description\s+foo/, 'add/info working'); unlink 'shell.rc'; diff --git a/test/sorting.t b/test/sorting.t index 85431a611..baacac6de 100755 --- a/test/sorting.t +++ b/test/sorting.t @@ -39,12 +39,12 @@ if (open my $fh, '>', 'sorting.rc') } # Test assorted sort orders. -qx{../src/task rc:sorting.rc add zero}; -qx{../src/task rc:sorting.rc add priority:H project:A due:yesterday one}; -qx{../src/task rc:sorting.rc add priority:M project:B due:today two}; -qx{../src/task rc:sorting.rc add priority:L project:C due:tomorrow three}; -qx{../src/task rc:sorting.rc add priority:H project:C due:today four}; -qx{../src/task rc:sorting.rc 2 start}; +qx{../src/task rc:sorting.rc add zero 2>&1}; +qx{../src/task rc:sorting.rc add priority:H project:A due:yesterday one 2>&1}; +qx{../src/task rc:sorting.rc add priority:M project:B due:today two 2>&1}; +qx{../src/task rc:sorting.rc add priority:L project:C due:tomorrow three 2>&1}; +qx{../src/task rc:sorting.rc add priority:H project:C due:today four 2>&1}; +qx{../src/task rc:sorting.rc 2 start 2>&1}; #diag (qx{../src/task rc:sorting.rc list}); my %tests = @@ -169,7 +169,7 @@ my %tests = for my $sort (sort keys %tests) { - my $output = qx{../src/task rc:sorting.rc rc.report.list.sort:${sort} list}; + my $output = qx{../src/task rc:sorting.rc rc.report.list.sort:${sort} list 2>&1}; for my $expectation (@{$tests{$sort}}) { like ($output, qr/$expectation/ms, "sort:${sort}"); diff --git a/test/special.t b/test/special.t index b4d2b973d..8ff3f8d06 100755 --- a/test/special.t +++ b/test/special.t @@ -45,15 +45,15 @@ if (open my $fh, '>', 'special.rc') } # Prove that +nocolor suppresses all color for a task. -qx{../src/task rc:special.rc add should have no red +nocolor priority:H}; -qx{../src/task rc:special.rc add should be red +nonag}; -my $output = qx{../src/task rc:special.rc ls}; +qx{../src/task rc:special.rc add should have no red +nocolor priority:H 2>&1}; +qx{../src/task rc:special.rc add should be red +nonag 2>&1}; +my $output = qx{../src/task rc:special.rc ls 2>&1}; like ($output, qr/\s1\s+H\s+should have no red/, 'no red in first task due to +nocolor'); like ($output, qr/\033\[31mshould be red\s+\033\[0m/, 'red in second task'); # Prove that +nonag suppresses nagging when a low priority task is completed # ahead of a high priority one. -$output = qx{../src/task rc:special.rc 2 done}; +$output = qx{../src/task rc:special.rc 2 done 2>&1}; unlike ($output, qr/NAG/, '+nonag suppressed nagging for task 2'); # Cleanup. diff --git a/test/start.t b/test/start.t index 52ae77a4b..8ed0f7487 100755 --- a/test/start.t +++ b/test/start.t @@ -39,30 +39,30 @@ if (open my $fh, '>', 'start.rc') } # Test the add/start/stop commands. -qx{../src/task rc:start.rc add one}; -qx{../src/task rc:start.rc add two}; -my $output = qx{../src/task rc:start.rc active}; +qx{../src/task rc:start.rc add one 2>&1}; +qx{../src/task rc:start.rc add two 2>&1}; +my $output = qx{../src/task rc:start.rc active 2>&1}; unlike ($output, qr/one/, 'one not active'); unlike ($output, qr/two/, 'two not active'); -qx{../src/task rc:start.rc 1 start}; -qx{../src/task rc:start.rc 2 start}; -$output = qx{../src/task rc:start.rc active}; +qx{../src/task rc:start.rc 1 start 2>&1}; +qx{../src/task rc:start.rc 2 start 2>&1}; +$output = qx{../src/task rc:start.rc active 2>&1}; like ($output, qr/one/, 'one active'); like ($output, qr/two/, 'two active'); -qx{../src/task rc:start.rc 1 stop}; -$output = qx{../src/task rc:start.rc active}; +qx{../src/task rc:start.rc 1 stop 2>&1}; +$output = qx{../src/task rc:start.rc active 2>&1}; unlike ($output, qr/one/, 'one not active'); like ($output, qr/two/, 'two active'); -qx{../src/task rc:start.rc 2 stop}; -$output = qx{../src/task rc:start.rc active}; +qx{../src/task rc:start.rc 2 stop 2>&1}; +$output = qx{../src/task rc:start.rc active 2>&1}; unlike ($output, qr/one/, 'one not active'); unlike ($output, qr/two/, 'two not active'); -qx{../src/task rc:start.rc 2 done}; -$output = qx{../src/task rc:start.rc list}; +qx{../src/task rc:start.rc 2 done 2>&1}; +$output = qx{../src/task rc:start.rc list 2>&1}; unlike ($output, qr/two/, 'two deleted'); # Create the rc file. @@ -74,12 +74,12 @@ if (open my $fh, '>', 'start2.rc') ok (-r 'start2.rc', 'Created start2.rc'); } -qx{../src/task rc:start2.rc 1 start}; -$output = qx{../src/task rc:start2.rc list}; +qx{../src/task rc:start2.rc 1 start 2>&1}; +$output = qx{../src/task rc:start2.rc list 2>&1}; like ($output, qr/Started task/, 'one start and annotated'); -qx{../src/task rc:start2.rc 1 stop}; -$output = qx{../src/task rc:start2.rc list}; +qx{../src/task rc:start2.rc 1 stop 2>&1}; +$output = qx{../src/task rc:start2.rc list 2>&1}; like ($output, qr/Stopped task/, 'one stopped and annotated'); # Create the rc file. @@ -93,12 +93,12 @@ if (open my $fh, '>', 'start3.rc') ok (-r 'start3.rc', 'Created start3.rc'); } -qx{../src/task rc:start3.rc 1 start}; -$output = qx{../src/task rc:start3.rc list}; +qx{../src/task rc:start3.rc 1 start 2>&1}; +$output = qx{../src/task rc:start3.rc list 2>&1}; like ($output, qr/Nu.+kör.+vi/ms, 'one start and annotated with custom description'); -qx{../src/task rc:start3.rc 1 stop}; -$output = qx{../src/task rc:start3.rc list}; +qx{../src/task rc:start3.rc 1 stop 2>&1}; +$output = qx{../src/task rc:start3.rc list 2>&1}; like ($output, qr/Nu.+stannar.+vi/ms, 'one stopped and annotated with custom description'); # Cleanup. diff --git a/test/subproject.t b/test/subproject.t index 81df4a28c..ff4672ab6 100755 --- a/test/subproject.t +++ b/test/subproject.t @@ -38,25 +38,25 @@ if (open my $fh, '>', 'sp.rc') ok (-r 'sp.rc', 'Created sp.rc'); } -my $setup = "../src/task rc:sp.rc add project:abc abc;" - . "../src/task rc:sp.rc add project:ab ab;" - . "../src/task rc:sp.rc add project:a a;" - . "../src/task rc:sp.rc add project:b b;"; +my $setup = "../src/task rc:sp.rc add project:abc abc 2>&1;" + . "../src/task rc:sp.rc add project:ab ab 2>&1;" + . "../src/task rc:sp.rc add project:a a 2>&1;" + . "../src/task rc:sp.rc add project:b b 2>&1;"; qx{$setup}; -my $output = qx{../src/task rc:sp.rc list project:b}; +my $output = qx{../src/task rc:sp.rc list project:b 2>&1}; like ($output, qr/\bb\s*$/m, 'abc,ab,a,b | b -> b'); -$output = qx{../src/task rc:sp.rc list project:a}; +$output = qx{../src/task rc:sp.rc list project:a 2>&1}; like ($output, qr/\babc\s*$/m, 'abc,ab,a,b | a -> abc'); like ($output, qr/\bab\s*$/m, 'abc,ab,a,b | a -> ab'); like ($output, qr/\ba\s*$/m, 'abc,ab,a,b | a -> a'); -$output = qx{../src/task rc:sp.rc list project:ab}; +$output = qx{../src/task rc:sp.rc list project:ab 2>&1}; like ($output, qr/\babc\s*$/m, 'abc,ab,a,b | a -> abc'); like ($output, qr/\bab\s*$/m, 'abc,ab,a,b | a -> ab'); -$output = qx{../src/task rc:sp.rc list project:abc}; +$output = qx{../src/task rc:sp.rc list project:abc 2>&1}; like ($output, qr/\babc\s*$/m, 'abc,ab,a,b | a -> abc'); $output = qx{../src/task rc:sp.rc list project:abcd 2>&1 >/dev/null}; diff --git a/test/substitute.t b/test/substitute.t index 591796bfc..3334b2450 100755 --- a/test/substitute.t +++ b/test/substitute.t @@ -40,38 +40,38 @@ if (open my $fh, '>', 'subst.rc') } # Test the substitution command. -qx{../src/task rc:subst.rc add foo foo foo}; -qx{../src/task rc:subst.rc 1 modify /foo/FOO/}; -my $output = qx{../src/task rc:subst.rc info 1}; +qx{../src/task rc:subst.rc add foo foo foo 2>&1}; +qx{../src/task rc:subst.rc 1 modify /foo/FOO/ 2>&1}; +my $output = qx{../src/task rc:subst.rc info 1 2>&1}; like ($output, qr/FOO foo foo/, 'substitution in description'); -qx{../src/task rc:subst.rc 1 modify /foo/FOO/g}; -$output = qx{../src/task rc:subst.rc info 1}; +qx{../src/task rc:subst.rc 1 modify /foo/FOO/g 2>&1}; +$output = qx{../src/task rc:subst.rc info 1 2>&1}; like ($output, qr/FOO FOO FOO/, 'global substitution in description'); # Test the substitution command on annotations. -qx{../src/task rc:subst.rc 1 annotate bar bar bar}; -qx{../src/task rc:subst.rc 1 modify /bar/BAR/}; -$output = qx{../src/task rc:subst.rc info 1}; +qx{../src/task rc:subst.rc 1 annotate bar bar bar 2>&1}; +qx{../src/task rc:subst.rc 1 modify /bar/BAR/ 2>&1}; +$output = qx{../src/task rc:subst.rc info 1 2>&1}; like ($output, qr/BAR bar bar/, 'substitution in annotation'); -qx{../src/task rc:subst.rc 1 modify /bar/BAR/g}; -$output = qx{../src/task rc:subst.rc info 1}; +qx{../src/task rc:subst.rc 1 modify /bar/BAR/g 2>&1}; +$output = qx{../src/task rc:subst.rc info 1 2>&1}; like ($output, qr/BAR BAR BAR/, 'global substitution in annotation'); -qx{../src/task rc:subst.rc 1 modify /FOO/aaa/}; -qx{../src/task rc:subst.rc 1 modify /FOO/bbb/}; -qx{../src/task rc:subst.rc 1 modify /FOO/ccc/}; -$output = qx{../src/task rc:subst.rc info 1}; +qx{../src/task rc:subst.rc 1 modify /FOO/aaa/ 2>&1}; +qx{../src/task rc:subst.rc 1 modify /FOO/bbb/ 2>&1}; +qx{../src/task rc:subst.rc 1 modify /FOO/ccc/ 2>&1}; +$output = qx{../src/task rc:subst.rc info 1 2>&1}; like ($output, qr/aaa bbb ccc/, 'individual successive substitution in description'); -qx{../src/task rc:subst.rc 1 modify /bbb//}; -$output = qx{../src/task rc:subst.rc info 1}; +qx{../src/task rc:subst.rc 1 modify /bbb// 2>&1}; +$output = qx{../src/task rc:subst.rc info 1 2>&1}; like ($output, qr/aaa ccc/, 'word deletion in description'); # Regexes -qx{../src/task rc:subst.rc rc.regex:on 1 modify "/c{3}/CcC/"}; -$output = qx{../src/task rc:subst.rc info 1}; +qx{../src/task rc:subst.rc rc.regex:on 1 modify "/c{3}/CcC/" 2>&1}; +$output = qx{../src/task rc:subst.rc info 1 2>&1}; like ($output, qr/aaa CcC/, 'regex'); # Cleanup. diff --git a/test/tag.t b/test/tag.t index 1ed481d2d..a41bdca66 100755 --- a/test/tag.t +++ b/test/tag.t @@ -39,27 +39,27 @@ if (open my $fh, '>', 'tag.rc') } # Add task with tags. -my $output = qx{../src/task rc:tag.rc add +one This +two is a test +three; ../src/task rc:tag.rc info 1}; +my $output = qx{../src/task rc:tag.rc add +one This +two is a test +three 2>&1; ../src/task rc:tag.rc info 1 2>&1}; like ($output, qr/^Tags\s+one two three\n/m, 'tags found'); # Remove tags. -$output = qx{../src/task rc:tag.rc 1 modify -three -two -one; ../src/task rc:tag.rc info 1}; +$output = qx{../src/task rc:tag.rc 1 modify -three -two -one 2>&1; ../src/task rc:tag.rc info 1 2>&1}; unlike ($output, qr/^Tags/m, '-three -two -one tag removed'); # Add tags. -$output = qx{../src/task rc:tag.rc 1 modify +four +five +six; ../src/task rc:tag.rc info 1}; +$output = qx{../src/task rc:tag.rc 1 modify +four +five +six 2>&1; ../src/task rc:tag.rc info 1 2>&1}; like ($output, qr/^Tags\s+four five six\n/m, 'tags found'); # Remove tags. -$output = qx{../src/task rc:tag.rc 1 modify -four -five -six; ../src/task rc:tag.rc info 1}; +$output = qx{../src/task rc:tag.rc 1 modify -four -five -six 2>&1; ../src/task rc:tag.rc info 1 2>&1}; unlike ($output, qr/^Tags/m, '-four -five -six tag removed'); # Add and remove tags. -$output = qx{../src/task rc:tag.rc 1 modify +duplicate -duplicate; ../src/task rc:tag.rc info 1}; +$output = qx{../src/task rc:tag.rc 1 modify +duplicate -duplicate 2>&1; ../src/task rc:tag.rc info 1 2>&1}; unlike ($output, qr/^Tags/m, '+duplicate -duplicate NOP'); # Remove missing tag. -$output = qx{../src/task rc:tag.rc 1 modify -missing; ../src/task rc:tag.rc info 1}; +$output = qx{../src/task rc:tag.rc 1 modify -missing 2>&1; ../src/task rc:tag.rc info 1 2>&1}; unlike ($output, qr/^Tags/m, '-missing NOP'); # Cleanup. diff --git a/test/timesheet.t b/test/timesheet.t index f36c5a772..71c300201 100755 --- a/test/timesheet.t +++ b/test/timesheet.t @@ -72,13 +72,13 @@ EOF ok (-r 'pending.data', 'Created pending.data'); } -my $output = qx{../src/task rc:time.rc timesheet}; +my $output = qx{../src/task rc:time.rc timesheet 2>&1}; like ($output, qr/Completed.+C0.+Started.+PS0/ms, 'one week of started and completed'); -$output = qx{../src/task rc:time.rc timesheet 2}; +$output = qx{../src/task rc:time.rc timesheet 2 2>&1}; like ($output, qr/Completed.+C0.+Started.+PS0.+Completed.+C1.+Started.+PS1/ms, 'two weeks of started and completed'); -$output = qx{../src/task rc:time.rc timesheet 3}; +$output = qx{../src/task rc:time.rc timesheet 3 2>&1}; like ($output, qr/Completed.+C0.+Started.+PS0.+Completed.+C1.+Started.+PS1.+Completed.+C2.+Started.+PS2/ms, 'three weeks of started and completed'); # Cleanup. diff --git a/test/uda_date.t b/test/uda_date.t index 44349c2fd..9cfa8856d 100755 --- a/test/uda_date.t +++ b/test/uda_date.t @@ -46,14 +46,14 @@ if (open my $fh, '>', 'uda.rc') } # Add tasks with and without the UDA. -qx{../src/task rc:uda.rc add with extra:tomorrow}; -qx{../src/task rc:uda.rc add without}; -my $output = qx{../src/task rc:uda.rc uda}; +qx{../src/task rc:uda.rc add with extra:tomorrow 2>&1}; +qx{../src/task rc:uda.rc add without 2>&1}; +my $output = qx{../src/task rc:uda.rc uda 2>&1}; like ($output, qr/1\s+[\d\/]+\s+with/, 'UDA date stored'); like ($output, qr/2\s+without/, 'UDA date blank'); # Add bad data. -$output = qx{../src/task rc:uda.rc add bad extra:unrecognized_date}; +$output = qx{../src/task rc:uda.rc add bad extra:unrecognized_date 2>&1}; unlike ($output, qr/Created task \d+/, 'UDA date bad data not accepted'); # Cleanup. diff --git a/test/uda_duration.t b/test/uda_duration.t index 57a923f7d..4784dfc7f 100755 --- a/test/uda_duration.t +++ b/test/uda_duration.t @@ -46,14 +46,14 @@ if (open my $fh, '>', 'uda.rc') } # Add tasks with and without the UDA. -qx{../src/task rc:uda.rc add with extra:1day}; -qx{../src/task rc:uda.rc add without}; -my $output = qx{../src/task rc:uda.rc uda}; +qx{../src/task rc:uda.rc add with extra:1day 2>&1}; +qx{../src/task rc:uda.rc add without 2>&1}; +my $output = qx{../src/task rc:uda.rc uda 2>&1}; like ($output, qr/1\s+1d\s+with/, 'UDA duration stored'); like ($output, qr/2\s+without/, 'UDA duration blank'); # Add bad data. -$output = qx{../src/task rc:uda.rc add bad extra:unrecognized_duration}; +$output = qx{../src/task rc:uda.rc add bad extra:unrecognized_duration 2>&1}; unlike ($output, qr/Created task \d+/, 'UDA duration bad data not accepted'); # Cleanup. diff --git a/test/uda_numeric.t b/test/uda_numeric.t index a51e84fa7..889a330bb 100755 --- a/test/uda_numeric.t +++ b/test/uda_numeric.t @@ -46,14 +46,14 @@ if (open my $fh, '>', 'uda.rc') } # Add tasks with and without the UDA. -qx{../src/task rc:uda.rc add with extra:123}; -qx{../src/task rc:uda.rc add without}; -my $output = qx{../src/task rc:uda.rc uda}; +qx{../src/task rc:uda.rc add with extra:123 2>&1}; +qx{../src/task rc:uda.rc add without 2>&1}; +my $output = qx{../src/task rc:uda.rc uda 2>&1}; like ($output, qr/1\s+\d+\s+with/, 'UDA numeric stored'); like ($output, qr/2\s+without/, 'UDA numeric blank'); # Add bad data. -$output = qx{../src/task rc:uda.rc add bad extra:unrecognized_numeric}; +$output = qx{../src/task rc:uda.rc add bad extra:unrecognized_numeric 2>&1}; unlike ($output, qr/Created task \d+/, 'UDA numeric bad data not accepted'); # Cleanup. diff --git a/test/uda_string.t b/test/uda_string.t index 8d5006313..7b3a6b541 100755 --- a/test/uda_string.t +++ b/test/uda_string.t @@ -46,9 +46,9 @@ if (open my $fh, '>', 'uda.rc') } # Add tasks with and without the UDA. -qx{../src/task rc:uda.rc add with extra:\\"one two\\"}; -qx{../src/task rc:uda.rc add without}; -my $output = qx{../src/task rc:uda.rc uda}; +qx{../src/task rc:uda.rc add with extra:\\"one two\\" 2>&1}; +qx{../src/task rc:uda.rc add without 2>&1}; +my $output = qx{../src/task rc:uda.rc uda 2>&1}; like ($output, qr/1\s+one two\s+with/, 'UDA string stored'); like ($output, qr/2\s+without/, 'UDA string blank'); diff --git a/test/undo.t b/test/undo.t index cda982cf7..a118e3e32 100755 --- a/test/undo.t +++ b/test/undo.t @@ -41,19 +41,19 @@ if (open my $fh, '>', 'undo.rc') } # Test the add/do/undo commands. -my $output = qx{../src/task rc:undo.rc add one; ../src/task rc:undo.rc info 1}; +my $output = qx{../src/task rc:undo.rc add one 2>&1; ../src/task rc:undo.rc info 1 2>&1}; ok (-r 'pending.data', 'pending.data created'); like ($output, qr/Status\s+Pending\n/, 'Pending'); -$output = qx{../src/task rc:undo.rc 1 do; ../src/task rc:undo.rc info 1}; +$output = qx{../src/task rc:undo.rc 1 do 2>&1; ../src/task rc:undo.rc info 1 2>&1}; ok (-r 'completed.data', 'completed.data created'); like ($output, qr/Status\s+Completed\n/, 'Completed'); -$output = qx{../src/task rc:undo.rc undo; ../src/task rc:undo.rc info 1}; +$output = qx{../src/task rc:undo.rc undo 2>&1; ../src/task rc:undo.rc info 1 2>&1}; ok (-r 'completed.data', 'completed.data created'); like ($output, qr/Status\s+Pending\n/, 'Pending'); -$output = qx{../src/task rc:undo.rc 1 do; ../src/task rc:undo.rc list 2>&1 >/dev/null}; +$output = qx{../src/task rc:undo.rc 1 do 2>&1; ../src/task rc:undo.rc list 2>&1 >/dev/null}; like ($output, qr/No matches/, 'No matches'); # Cleanup. diff --git a/test/upgrade.t b/test/upgrade.t index a60ff11bb..88234f2f4 100755 --- a/test/upgrade.t +++ b/test/upgrade.t @@ -40,17 +40,17 @@ if (open my $fh, '>', 'upgrade.rc') } # Add a plain task, then upgrade to recurring, test for correctness. -qx{../src/task rc:upgrade.rc add one}; -my $output = qx{../src/task rc:upgrade.rc 1 info}; +qx{../src/task rc:upgrade.rc add one 2>&1}; +my $output = qx{../src/task rc:upgrade.rc 1 info 2>&1}; like ($output, qr/Status\s+Pending/, 'Plain task entered'); -qx{../src/task rc:upgrade.rc 1 modify due:tomorrow recur:weekly}; -qx{../src/task rc:upgrade.rc list}; -$output = qx{../src/task rc:upgrade.rc 1 info}; +qx{../src/task rc:upgrade.rc 1 modify due:tomorrow recur:weekly 2>&1}; +qx{../src/task rc:upgrade.rc list 2>&1}; +$output = qx{../src/task rc:upgrade.rc 1 info 2>&1}; like ($output, qr/Status\s+Recurring/, 'Upgraded parent: good status'); like ($output, qr/Recurrence\s+weekly/, 'Upgraded parent: good recurrence'); -$output = qx{../src/task rc:upgrade.rc 2 info}; +$output = qx{../src/task rc:upgrade.rc 2 info 2>&1}; like ($output, qr/Status\s+Pending/, 'Upgraded child: good status'); like ($output, qr/Recurrence\s+weekly/, 'Upgraded child: good recurrence'); diff --git a/test/urgency.t b/test/urgency.t index 0a0246767..733817a3a 100755 --- a/test/urgency.t +++ b/test/urgency.t @@ -56,109 +56,109 @@ if (open my $fh, '>', 'urgency.rc') # calculated. # priority -qx{../src/task rc:urgency.rc add control}; # task 1 -qx{../src/task rc:urgency.rc add 1a pri:H}; # task 2 -qx{../src/task rc:urgency.rc add 1b pri:M}; # task 3 -qx{../src/task rc:urgency.rc add 1c pri:L}; # task 4 +qx{../src/task rc:urgency.rc add control 2>&1}; # task 1 +qx{../src/task rc:urgency.rc add 1a pri:H 2>&1}; # task 2 +qx{../src/task rc:urgency.rc add 1b pri:M 2>&1}; # task 3 +qx{../src/task rc:urgency.rc add 1c pri:L 2>&1}; # task 4 # priority: 0 (pending) -my $output = qx{../src/task rc:urgency.rc 1 _urgency}; +my $output = qx{../src/task rc:urgency.rc 1 _urgency 2>&1}; like ($output, qr/urgency 0$/ms, 'Control = 0'); # priority: 10 (pri:H) -$output = qx{../src/task rc:urgency.rc 2 _urgency}; +$output = qx{../src/task rc:urgency.rc 2 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, 'pri:H = 10'); # priority: 6.5 (pri:M) -$output = qx{../src/task rc:urgency.rc 3 _urgency}; +$output = qx{../src/task rc:urgency.rc 3 _urgency 2>&1}; like ($output, qr/urgency 6\.5$/ms, 'pri:M = 6.5'); # priority: 3 (pri:L) -$output = qx{../src/task rc:urgency.rc 4 _urgency}; +$output = qx{../src/task rc:urgency.rc 4 _urgency 2>&1}; like ($output, qr/urgency 3$/ms, 'pri:L = 3'); # project: 10 (project) -qx{../src/task rc:urgency.rc add 2a project:P}; # task 5 -$output = qx{../src/task rc:urgency.rc 5 _urgency}; +qx{../src/task rc:urgency.rc add 2a project:P 2>&1}; # task 5 +$output = qx{../src/task rc:urgency.rc 5 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, 'pro:P = 10'); # active: 10 (active) -qx{../src/task rc:urgency.rc add 3a}; # task 6 -qx{../src/task rc:urgency.rc 6 start}; -$output = qx{../src/task rc:urgency.rc 6 _urgency}; +qx{../src/task rc:urgency.rc add 3a 2>&1}; # task 6 +qx{../src/task rc:urgency.rc 6 start 2>&1}; +$output = qx{../src/task rc:urgency.rc 6 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, 'active = 10'); # next: 10 (+next) + 8 (1 tag) -qx{../src/task rc:urgency.rc add 4a +next}; # task 7 -$output = qx{../src/task rc:urgency.rc 7 _urgency}; +qx{../src/task rc:urgency.rc add 4a +next 2>&1}; # task 7 +$output = qx{../src/task rc:urgency.rc 7 _urgency 2>&1}; like ($output, qr/urgency 18$/ms, '+next = 18'); # tags -qx{../src/task rc:urgency.rc add 5a +one}; # task 8 -qx{../src/task rc:urgency.rc add 5b +one +two}; # task 9 -qx{../src/task rc:urgency.rc add 5c +one +two +three}; # task 10 -qx{../src/task rc:urgency.rc add 5d +one +two +three +four}; # task 11 +qx{../src/task rc:urgency.rc add 5a +one 2>&1}; # task 8 +qx{../src/task rc:urgency.rc add 5b +one +two 2>&1}; # task 9 +qx{../src/task rc:urgency.rc add 5c +one +two +three 2>&1}; # task 10 +qx{../src/task rc:urgency.rc add 5d +one +two +three +four 2>&1}; # task 11 # tags: 8 (1 tag) -$output = qx{../src/task rc:urgency.rc 8 _urgency}; +$output = qx{../src/task rc:urgency.rc 8 _urgency 2>&1}; like ($output, qr/urgency 8$/ms, '+one = 8'); # tags: 9 (2 tags) -$output = qx{../src/task rc:urgency.rc 9 _urgency}; +$output = qx{../src/task rc:urgency.rc 9 _urgency 2>&1}; like ($output, qr/urgency 9$/ms, '+one +two = 9'); # tags: 10 (3 tags) -$output = qx{../src/task rc:urgency.rc 10 _urgency}; +$output = qx{../src/task rc:urgency.rc 10 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, '+one +two +three = 10'); # tags: 10 (4 tags) -$output = qx{../src/task rc:urgency.rc 10 _urgency}; +$output = qx{../src/task rc:urgency.rc 10 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, '+one +two +three +four = 10'); # annotations -qx{../src/task rc:urgency.rc add 6a}; # task 12 -qx{../src/task rc:urgency.rc 12 annotate A}; -qx{../src/task rc:urgency.rc add 6b}; # task 13 -qx{../src/task rc:urgency.rc 13 annotate A}; -qx{../src/task rc:urgency.rc 13 annotate B}; -qx{../src/task rc:urgency.rc add 6c}; # task 14 -qx{../src/task rc:urgency.rc 14 annotate A}; -qx{../src/task rc:urgency.rc 14 annotate B}; -qx{../src/task rc:urgency.rc 14 annotate C}; -qx{../src/task rc:urgency.rc add 6d}; # task 15 -qx{../src/task rc:urgency.rc 15 annotate A}; -qx{../src/task rc:urgency.rc 15 annotate B}; -qx{../src/task rc:urgency.rc 15 annotate C}; -qx{../src/task rc:urgency.rc 15 annotate D}; +qx{../src/task rc:urgency.rc add 6a 2>&1}; # task 12 +qx{../src/task rc:urgency.rc 12 annotate A 2>&1}; +qx{../src/task rc:urgency.rc add 6b 2>&1}; # task 13 +qx{../src/task rc:urgency.rc 13 annotate A 2>&1}; +qx{../src/task rc:urgency.rc 13 annotate B 2>&1}; +qx{../src/task rc:urgency.rc add 6c 2>&1}; # task 14 +qx{../src/task rc:urgency.rc 14 annotate A 2>&1}; +qx{../src/task rc:urgency.rc 14 annotate B 2>&1}; +qx{../src/task rc:urgency.rc 14 annotate C 2>&1}; +qx{../src/task rc:urgency.rc add 6d 2>&1}; # task 15 +qx{../src/task rc:urgency.rc 15 annotate A 2>&1}; +qx{../src/task rc:urgency.rc 15 annotate B 2>&1}; +qx{../src/task rc:urgency.rc 15 annotate C 2>&1}; +qx{../src/task rc:urgency.rc 15 annotate D 2>&1}; # annotations: 8 (1 annotation) -$output = qx{../src/task rc:urgency.rc 12 _urgency}; +$output = qx{../src/task rc:urgency.rc 12 _urgency 2>&1}; like ($output, qr/urgency 8$/ms, '1 annotation = 8'); # annotations: 9 (2 annotations) -$output = qx{../src/task rc:urgency.rc 13 _urgency}; +$output = qx{../src/task rc:urgency.rc 13 _urgency 2>&1}; like ($output, qr/urgency 9$/ms, '2 annotations = 9'); # annotations: 10 (3 annotations) -$output = qx{../src/task rc:urgency.rc 14 _urgency}; +$output = qx{../src/task rc:urgency.rc 14 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, '3 annotations = 10'); # annotations: 10 (4 annotations) -$output = qx{../src/task rc:urgency.rc 15 _urgency}; +$output = qx{../src/task rc:urgency.rc 15 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, '4 annotations = 10'); # waiting: -10 -qx{../src/task rc:urgency.rc add 7a wait:10s}; # task 16 -$output = qx{../src/task rc:urgency.rc 16 _urgency}; +qx{../src/task rc:urgency.rc add 7a wait:10s 2>&1}; # task 16 +$output = qx{../src/task rc:urgency.rc 16 _urgency 2>&1}; like ($output, qr/urgency -10$/ms, 'waiting = -10'); # blocked: 10 (blocked) -qx{../src/task rc:urgency.rc add 8a depends:1}; # task 17 -$output = qx{../src/task rc:urgency.rc 17 _urgency}; +qx{../src/task rc:urgency.rc add 8a depends:1 2>&1}; # task 17 +$output = qx{../src/task rc:urgency.rc 17 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, 'blocked = 10'); # blocking: 10 (blocking) -$output = qx{../src/task rc:urgency.rc 1 _urgency}; +$output = qx{../src/task rc:urgency.rc 1 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, 'blocking = 10'); # due @@ -169,145 +169,145 @@ like ($output, qr/urgency 10$/ms, 'blocking = 10'); # has due date -> 0.3 # no due date -> 0.0 -qx{../src/task rc:urgency.rc add 9a due:-10d}; # task 18 -qx{../src/task rc:urgency.rc add 9b due:-7d}; # task 19 -qx{../src/task rc:urgency.rc add 9c due:-6d}; # task 20 -qx{../src/task rc:urgency.rc add 9d due:-5d}; # task 21 -qx{../src/task rc:urgency.rc add 9e due:-4d}; # task 22 -qx{../src/task rc:urgency.rc add 9f due:-3d}; # task 23 -qx{../src/task rc:urgency.rc add 9g due:-2d}; # task 24 -qx{../src/task rc:urgency.rc add 9h due:-1d}; # task 25 -qx{../src/task rc:urgency.rc add 9i due:now}; # task 26 -qx{../src/task rc:urgency.rc add 9j due:25h}; # task 27 -qx{../src/task rc:urgency.rc add 9k due:49h}; # task 28 -qx{../src/task rc:urgency.rc add 9l due:73h}; # task 29 -qx{../src/task rc:urgency.rc add 9m due:97h}; # task 30 -qx{../src/task rc:urgency.rc add 9n due:121h}; # task 31 -qx{../src/task rc:urgency.rc add 9o due:145h}; # task 32 -qx{../src/task rc:urgency.rc add 9p due:169h}; # task 33 -qx{../src/task rc:urgency.rc add 9q due:193h}; # task 34 -qx{../src/task rc:urgency.rc add 9r due:217h}; # task 35 -qx{../src/task rc:urgency.rc add 9s due:241h}; # task 36 -qx{../src/task rc:urgency.rc add 9t due:265h}; # task 37 -qx{../src/task rc:urgency.rc add 9u due:289h}; # task 38 -qx{../src/task rc:urgency.rc add 9v due:313h}; # task 39 -qx{../src/task rc:urgency.rc add 9w due:337h}; # task 40 -qx{../src/task rc:urgency.rc add 9x due:361h}; # task 41 +qx{../src/task rc:urgency.rc add 9a due:-10d 2>&1}; # task 18 +qx{../src/task rc:urgency.rc add 9b due:-7d 2>&1}; # task 19 +qx{../src/task rc:urgency.rc add 9c due:-6d 2>&1}; # task 20 +qx{../src/task rc:urgency.rc add 9d due:-5d 2>&1}; # task 21 +qx{../src/task rc:urgency.rc add 9e due:-4d 2>&1}; # task 22 +qx{../src/task rc:urgency.rc add 9f due:-3d 2>&1}; # task 23 +qx{../src/task rc:urgency.rc add 9g due:-2d 2>&1}; # task 24 +qx{../src/task rc:urgency.rc add 9h due:-1d 2>&1}; # task 25 +qx{../src/task rc:urgency.rc add 9i due:now 2>&1}; # task 26 +qx{../src/task rc:urgency.rc add 9j due:25h 2>&1}; # task 27 +qx{../src/task rc:urgency.rc add 9k due:49h 2>&1}; # task 28 +qx{../src/task rc:urgency.rc add 9l due:73h 2>&1}; # task 29 +qx{../src/task rc:urgency.rc add 9m due:97h 2>&1}; # task 30 +qx{../src/task rc:urgency.rc add 9n due:121h 2>&1}; # task 31 +qx{../src/task rc:urgency.rc add 9o due:145h 2>&1}; # task 32 +qx{../src/task rc:urgency.rc add 9p due:169h 2>&1}; # task 33 +qx{../src/task rc:urgency.rc add 9q due:193h 2>&1}; # task 34 +qx{../src/task rc:urgency.rc add 9r due:217h 2>&1}; # task 35 +qx{../src/task rc:urgency.rc add 9s due:241h 2>&1}; # task 36 +qx{../src/task rc:urgency.rc add 9t due:265h 2>&1}; # task 37 +qx{../src/task rc:urgency.rc add 9u due:289h 2>&1}; # task 38 +qx{../src/task rc:urgency.rc add 9v due:313h 2>&1}; # task 39 +qx{../src/task rc:urgency.rc add 9w due:337h 2>&1}; # task 40 +qx{../src/task rc:urgency.rc add 9x due:361h 2>&1}; # task 41 # due: 10 (due:-10d) -$output = qx{../src/task rc:urgency.rc 18 _urgency}; +$output = qx{../src/task rc:urgency.rc 18 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, 'due:-10d = 10'); # due: 10 (due:-7d) -$output = qx{../src/task rc:urgency.rc 19 _urgency}; +$output = qx{../src/task rc:urgency.rc 19 _urgency 2>&1}; like ($output, qr/urgency 10$/ms, 'due:-7d = 10'); # due: 9.6 (due:-6d) -$output = qx{../src/task rc:urgency.rc 20 _urgency}; +$output = qx{../src/task rc:urgency.rc 20 _urgency 2>&1}; like ($output, qr/urgency 9.6/ms, 'due:-6d = 9.6'); # due: 9.2 (due:-5d) -$output = qx{../src/task rc:urgency.rc 21 _urgency}; +$output = qx{../src/task rc:urgency.rc 21 _urgency 2>&1}; like ($output, qr/urgency 9.2/ms, 'due:-5d = 9.2'); # due: 8.8 (due:-4d) -$output = qx{../src/task rc:urgency.rc 22 _urgency}; +$output = qx{../src/task rc:urgency.rc 22 _urgency 2>&1}; like ($output, qr/urgency 8.8/ms, 'due:-4d = 8.8'); # due: 8.4 (due:-3d) -$output = qx{../src/task rc:urgency.rc 23 _urgency}; +$output = qx{../src/task rc:urgency.rc 23 _urgency 2>&1}; like ($output, qr/urgency 8.4/ms, 'due:-3d = 8.4'); # due: 8 (due:-2d) -$output = qx{../src/task rc:urgency.rc 24 _urgency}; +$output = qx{../src/task rc:urgency.rc 24 _urgency 2>&1}; like ($output, qr/urgency 8/ms, 'due:-2d = 8'); # due: 7.6 (due:-1d) -$output = qx{../src/task rc:urgency.rc 25 _urgency}; +$output = qx{../src/task rc:urgency.rc 25 _urgency 2>&1}; like ($output, qr/urgency 7.6/ms, 'due:-1d = 7.6'); # due: 7.2 (due:now) -$output = qx{../src/task rc:urgency.rc 26 _urgency}; +$output = qx{../src/task rc:urgency.rc 26 _urgency 2>&1}; like ($output, qr/urgency 7.2$/ms, 'due:now = 7.2'); # due: 6.8 (due:1d) -$output = qx{../src/task rc:urgency.rc 27 _urgency}; +$output = qx{../src/task rc:urgency.rc 27 _urgency 2>&1}; like ($output, qr/urgency 6.8/ms, 'due:1d = 6.8'); # due: 6.4 (due:2d) -$output = qx{../src/task rc:urgency.rc 28 _urgency}; +$output = qx{../src/task rc:urgency.rc 28 _urgency 2>&1}; like ($output, qr/urgency 6.4/ms, 'due:2d = 6.4'); # due: 6 (due:3d) -$output = qx{../src/task rc:urgency.rc 29 _urgency}; +$output = qx{../src/task rc:urgency.rc 29 _urgency 2>&1}; like ($output, qr/urgency 6/ms, 'due:3d = 6'); # due: 5.6 (due:4d) -$output = qx{../src/task rc:urgency.rc 30 _urgency}; +$output = qx{../src/task rc:urgency.rc 30 _urgency 2>&1}; like ($output, qr/urgency 5.6/ms, 'due:4d = 5.6'); # due: 5.2 (due:5d) -$output = qx{../src/task rc:urgency.rc 31 _urgency}; +$output = qx{../src/task rc:urgency.rc 31 _urgency 2>&1}; like ($output, qr/urgency 5.2/ms, 'due:5d = 5.2'); # due: 4.8 (due:6d) -$output = qx{../src/task rc:urgency.rc 32 _urgency}; +$output = qx{../src/task rc:urgency.rc 32 _urgency 2>&1}; like ($output, qr/urgency 4.8/ms, 'due:6d = 4.8'); # due: 4.4 (due:7d) -$output = qx{../src/task rc:urgency.rc 33 _urgency}; +$output = qx{../src/task rc:urgency.rc 33 _urgency 2>&1}; like ($output, qr/urgency 4.4/ms, 'due:7d = 4.4'); # due: 4 (due:8d) -$output = qx{../src/task rc:urgency.rc 34 _urgency}; +$output = qx{../src/task rc:urgency.rc 34 _urgency 2>&1}; like ($output, qr/urgency 4/ms, 'due:8d = 4'); # due: 3.6 (due:9d) -$output = qx{../src/task rc:urgency.rc 35 _urgency}; +$output = qx{../src/task rc:urgency.rc 35 _urgency 2>&1}; like ($output, qr/urgency 3.6/ms, 'due:9d = 3.6'); # due: 3.2 (due:10d) -$output = qx{../src/task rc:urgency.rc 36 _urgency}; +$output = qx{../src/task rc:urgency.rc 36 _urgency 2>&1}; like ($output, qr/urgency 3.2/ms, 'due:10d = 3.2'); # due: 2.8 (due:11d) -$output = qx{../src/task rc:urgency.rc 37 _urgency}; +$output = qx{../src/task rc:urgency.rc 37 _urgency 2>&1}; like ($output, qr/urgency 2.8/ms, 'due:11d = 2.8'); # due: 2.4 (due:12d) -$output = qx{../src/task rc:urgency.rc 38 _urgency}; +$output = qx{../src/task rc:urgency.rc 38 _urgency 2>&1}; like ($output, qr/urgency 2.4/ms, 'due:12d = 2.4'); # due: 2 (due:13d) -$output = qx{../src/task rc:urgency.rc 39 _urgency}; +$output = qx{../src/task rc:urgency.rc 39 _urgency 2>&1}; like ($output, qr/urgency 2/ms, 'due:13d = 2'); # due: 1.6 (due:14d) -$output = qx{../src/task rc:urgency.rc 40 _urgency}; +$output = qx{../src/task rc:urgency.rc 40 _urgency 2>&1}; like ($output, qr/urgency 1.6/ms, 'due:14d = 1.6'); # due: 1.6 (due:20d) -$output = qx{../src/task rc:urgency.rc 41 _urgency}; +$output = qx{../src/task rc:urgency.rc 41 _urgency 2>&1}; like ($output, qr/urgency 1.6$/ms, 'due:20d = 1.6'); # user.project: 10 (pro:PROJECT) + 10 (project) -qx{../src/task rc:urgency.rc add 10a project:PROJECT}; # task 42 -$output = qx{../src/task rc:urgency.rc 42 _urgency}; +qx{../src/task rc:urgency.rc add 10a project:PROJECT 2>&1}; # task 42 +$output = qx{../src/task rc:urgency.rc 42 _urgency 2>&1}; like ($output, qr/urgency 20$/ms, 'pro:PROJECT = 20'); # user.tag: 10 (+TAG) + 8 (1 tag) -qx{../src/task rc:urgency.rc add 11a +TAG}; # task 43 -$output = qx{../src/task rc:urgency.rc 43 _urgency}; +qx{../src/task rc:urgency.rc add 11a +TAG 2>&1}; # task 43 +$output = qx{../src/task rc:urgency.rc 43 _urgency 2>&1}; like ($output, qr/urgency 18$/ms, '+TAG = 18'); # scheduled 0 (scheduled future) -qx {../src/task rc:urgency.rc add 12a scheduled:eom}; -$output = qx{../src/task rc:urgency.rc 44 _urgency}; +qx {../src/task rc:urgency.rc add 12a scheduled:eom 2>&1}; +$output = qx{../src/task rc:urgency.rc 44 _urgency 2>&1}; like ($output, qr/urgency 0$/ms, 'scheduled future = 0'); # scheduled 5 (scheduled past) -qx {../src/task rc:urgency.rc add 12b scheduled:yesterday}; -$output = qx{../src/task rc:urgency.rc 45 _urgency}; +qx {../src/task rc:urgency.rc add 12b scheduled:yesterday 2>&1}; +$output = qx{../src/task rc:urgency.rc 45 _urgency 2>&1}; like ($output, qr/urgency 5$/ms, 'scheduled past = 5'); # Cleanup. diff --git a/test/utf8.t b/test/utf8.t index d3b5f0332..3198057b4 100755 --- a/test/utf8.t +++ b/test/utf8.t @@ -39,34 +39,34 @@ if (open my $fh, '>', 'utf8.rc') } # Add a task with UTF8 in the description. -qx{../src/task rc:utf8.rc add Çirçös}; -qx{../src/task rc:utf8.rc add Hello world ☺}; -qx{../src/task rc:utf8.rc add ¥£€\$¢₡₢₣₤₥₦₧₨₩₪₫₭₮₯}; -qx{../src/task rc:utf8.rc add Pchnąć w tę łódź jeża lub ośm skrzyń fig}; -qx{../src/task rc:utf8.rc add ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า}; -qx{../src/task rc:utf8.rc add イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム}; -qx{../src/task rc:utf8.rc add いろはにほへとちりぬるを}; -qx{../src/task rc:utf8.rc add D\\'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh}; -qx{../src/task rc:utf8.rc add Árvíztűrő tükörfúrógép}; -qx{../src/task rc:utf8.rc add Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa}; -qx{../src/task rc:utf8.rc add Sævör grét áðan því úlpan var ónýt}; -qx{../src/task rc:utf8.rc add Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Wolther spillede på xylofon.}; -qx{../src/task rc:utf8.rc add Falsches Üben von Xylophonmusik quält jeden größeren Zwerg}; -qx{../src/task rc:utf8.rc add Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich}; -qx{../src/task rc:utf8.rc add Heizölrückstoßabdämpfung}; -qx{../src/task rc:utf8.rc add Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο}; -qx{../src/task rc:utf8.rc add Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία}; +qx{../src/task rc:utf8.rc add Çirçös 2>&1}; +qx{../src/task rc:utf8.rc add Hello world ☺ 2>&1}; +qx{../src/task rc:utf8.rc add ¥£€\$¢₡₢₣₤₥₦₧₨₩₪₫₭₮₯ 2>&1}; +qx{../src/task rc:utf8.rc add Pchnąć w tę łódź jeża lub ośm skrzyń fig 2>&1}; +qx{../src/task rc:utf8.rc add ๏ เป็นมนุษย์สุดประเสริฐเลิศคุณค่า 2>&1}; +qx{../src/task rc:utf8.rc add イロハニホヘト チリヌルヲ ワカヨタレソ ツネナラム 2>&1}; +qx{../src/task rc:utf8.rc add いろはにほへとちりぬるを 2>&1}; +qx{../src/task rc:utf8.rc add D\\'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh 2>&1}; +qx{../src/task rc:utf8.rc add Árvíztűrő tükörfúrógép 2>&1}; +qx{../src/task rc:utf8.rc add Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa 2>&1}; +qx{../src/task rc:utf8.rc add Sævör grét áðan því úlpan var ónýt 2>&1}; +qx{../src/task rc:utf8.rc add Quizdeltagerne spiste jordbær med fløde, mens cirkusklovnen Wolther spillede på xylofon. 2>&1}; +qx{../src/task rc:utf8.rc add Falsches Üben von Xylophonmusik quält jeden größeren Zwerg 2>&1}; +qx{../src/task rc:utf8.rc add Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich 2>&1}; +qx{../src/task rc:utf8.rc add Heizölrückstoßabdämpfung 2>&1}; +qx{../src/task rc:utf8.rc add Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ στὸ χρυσαφὶ ξέφωτο 2>&1}; +qx{../src/task rc:utf8.rc add Ξεσκεπάζω τὴν ψυχοφθόρα βδελυγμία 2>&1}; -my $output = qx{../src/task rc:utf8.rc ls}; +my $output = qx{../src/task rc:utf8.rc ls 2>&1}; diag ($output); like ($output, qr/17/, 'all 17 tasks shown'); -qx{../src/task rc:utf8.rc add project:Çirçös utf8 in project}; -$output = qx{../src/task rc:utf8.rc ls project:Çirçös}; +qx{../src/task rc:utf8.rc add project:Çirçös utf8 in project 2>&1}; +$output = qx{../src/task rc:utf8.rc ls project:Çirçös 2>&1}; like ($output, qr/Çirçös.+utf8 in project/, 'utf8 in project works'); -qx{../src/task rc:utf8.rc add utf8 in tag +Zwölf}; -$output = qx{../src/task rc:utf8.rc ls +Zwölf}; +qx{../src/task rc:utf8.rc add utf8 in tag +Zwölf 2>&1}; +$output = qx{../src/task rc:utf8.rc ls +Zwölf 2>&1}; like ($output, qr/utf8 in tag/, 'utf8 in tag works'); # Cleanup. diff --git a/test/uuid.t b/test/uuid.t index 0dd09047e..d4be08d19 100755 --- a/test/uuid.t +++ b/test/uuid.t @@ -62,9 +62,9 @@ EOF ok (-r 'pending.data', 'Created completed.data'); } -qx{../src/task rc:uuid.rc 9deed7ca-843d-4259-b2c4-40ce73e8e4f3 modify ONE}; -qx{../src/task rc:uuid.rc 2 modify TWO}; -my $output = qx{../src/task rc:uuid.rc list}; +qx{../src/task rc:uuid.rc 9deed7ca-843d-4259-b2c4-40ce73e8e4f3 modify ONE 2>&1}; +qx{../src/task rc:uuid.rc 2 modify TWO 2>&1}; +my $output = qx{../src/task rc:uuid.rc list 2>&1}; like ($output, qr/ONE/, 'task list ONE'); like ($output, qr/TWO/, 'task list TWO'); like ($output, qr/three/, 'task list three'); @@ -74,8 +74,8 @@ unlike ($output, qr/five/, 'task does not list five'); unlike ($output, qr/eenndd/, 'task does not list eenndd'); unlike ($output, qr/UUNNDDOO/, 'task does not list UUNNDDOO'); -qx{../src/task rc:uuid.rc ea3b4822-574c-464b-8025-7f7be9f3cc57 modify FOUR}; -$output = qx{../src/task rc:uuid.rc completed}; +qx{../src/task rc:uuid.rc ea3b4822-574c-464b-8025-7f7be9f3cc57 modify FOUR 2>&1}; +$output = qx{../src/task rc:uuid.rc completed 2>&1}; unlike ($output, qr/ONE/, 'task does not list ONE'); unlike ($output, qr/TWO/, 'task does not list TWO'); unlike ($output, qr/three/, 'task does not list three'); @@ -85,23 +85,23 @@ like ($output, qr/five/, 'did not modify task five'); like ($output, qr/eenndd/, 'did not modify task eenndd'); like ($output, qr/UUNNDDOO/, 'did not modify task UUNNDDOO'); -qx{../src/task rc:uuid.rc c1361003-948e-43e8-85c8-15d28dc3c71c modify status:pending}; -$output = qx{../src/task rc:uuid.rc list}; +qx{../src/task rc:uuid.rc c1361003-948e-43e8-85c8-15d28dc3c71c modify status:pending 2>&1}; +$output = qx{../src/task rc:uuid.rc list 2>&1}; like ($output, qr/UUNNDDOO/, 'task UUNNDDOO modified status to pending'); -$output = qx{../src/task rc:uuid.rc completed}; +$output = qx{../src/task rc:uuid.rc completed 2>&1}; unlike ($output, qr/UUNNDDOO/, 'task does not list UUNNDDOO after modification'); -qx{../src/task rc:uuid.rc d71d3566-7a6b-4c32-8f0b-6de75bb9397b modify start:1293796800}; -$output = qx{../src/task rc:uuid.rc long}; +qx{../src/task rc:uuid.rc d71d3566-7a6b-4c32-8f0b-6de75bb9397b modify start:1293796800 2>&1}; +$output = qx{../src/task rc:uuid.rc long 2>&1}; like ($output, qr/12\/31\/2010/, 'modified start date of task ssttaarrtt'); -qx{../src/task rc:uuid.rc 727baa6c-65b8-485e-a810-e133e3cd83dc modify end:1293796800}; -$output = qx{../src/task rc:uuid.rc completed}; +qx{../src/task rc:uuid.rc 727baa6c-65b8-485e-a810-e133e3cd83dc modify end:1293796800 2>&1}; +$output = qx{../src/task rc:uuid.rc completed 2>&1}; like ($output, qr/12\/31\/2010/, 'modified end date of task eenndd'); -qx{../src/task rc:uuid.rc aa4abef1-1dc5-4a43-b6a0-7872df3094bb modify entry:1293710400}; -qx{../src/task rc:uuid.rc aa4abef1-1dc5-4a43-b6a0-7872df3094bb modify start:1293883200}; -$output = qx{../src/task rc:uuid.rc long}; +qx{../src/task rc:uuid.rc aa4abef1-1dc5-4a43-b6a0-7872df3094bb modify entry:1293710400 2>&1}; +qx{../src/task rc:uuid.rc aa4abef1-1dc5-4a43-b6a0-7872df3094bb modify start:1293883200 2>&1}; +$output = qx{../src/task rc:uuid.rc long 2>&1}; like ($output, qr/12\/30\/2010/, 'modified entry date of task three'); like ($output, qr/1\/1\/2011/, 'added start date of task three with modify'); diff --git a/test/verbose.t b/test/verbose.t index 386dad3a2..ca08e929c 100755 --- a/test/verbose.t +++ b/test/verbose.t @@ -40,22 +40,22 @@ if (open my $fh, '>', 'verbose.rc') } # Verbosity: 'new-id' -my $output = qx{../src/task rc:verbose.rc rc.verbose:new-id add Sample1}; +my $output = qx{../src/task rc:verbose.rc rc.verbose:new-id add Sample1 2>&1}; like ($output, qr/Created task \d/, '\'new-id\' verbosity good'); -$output = qx{../src/task rc:verbose.rc rc.verbose:nothing add Sample2}; +$output = qx{../src/task rc:verbose.rc rc.verbose:nothing add Sample2 2>&1}; unlike ($output, qr/Created task \d/, '\'new-id\' verbosity good'); # Verbosity: 'label' -$output = qx{../src/task rc:verbose.rc ls rc.verbose:label}; +$output = qx{../src/task rc:verbose.rc ls rc.verbose:label 2>&1}; like ($output, qr/ID.+Project.+Pri.+Description/, '\'label\' verbosity good'); # Verbosity: 'affected' -$output = qx{../src/task rc:verbose.rc ls rc.verbose:affected}; +$output = qx{../src/task rc:verbose.rc ls rc.verbose:affected 2>&1}; like ($output, qr/^\d+ tasks$/ms, '\'affected\' verbosity good'); # Off -$output = qx{../src/task rc:verbose.rc ls rc.verbose:nothing}; +$output = qx{../src/task rc:verbose.rc ls rc.verbose:nothing 2>&1}; unlike ($output, qr/^\d+ tasks$/ms, '\'affected\' verbosity good'); unlike ($output, qr/ID.+Project.+Pri.+Description/, '\'label\' verbosity good'); diff --git a/test/wait.t b/test/wait.t index 370f8a314..26ebb8c59 100755 --- a/test/wait.t +++ b/test/wait.t @@ -41,37 +41,37 @@ if (open my $fh, '>', 'wait.rc') } # Add a waiting task, check it is not there, wait, then check it is. -qx{../src/task rc:wait.rc add yeswait wait:2s}; -qx{../src/task rc:wait.rc add nowait}; +qx{../src/task rc:wait.rc add yeswait wait:2s 2>&1}; +qx{../src/task rc:wait.rc add nowait 2>&1}; -my $output = qx{../src/task rc:wait.rc ls}; +my $output = qx{../src/task rc:wait.rc ls 2>&1}; like ($output, qr/nowait/ms, 'non-waiting task visible'); unlike ($output, qr/yeswait/ms, 'waiting task invisible'); diag ("3 second delay"); sleep 3; -$output = qx{../src/task rc:wait.rc ls}; +$output = qx{../src/task rc:wait.rc ls 2>&1}; like ($output, qr/nowait/ms, 'non-waiting task still visible'); like ($output, qr/yeswait/ms, 'waiting task now visible'); -qx{../src/task rc:wait.rc 1 modify wait:2s}; -$output = qx{../src/task rc:wait.rc ls}; +qx{../src/task rc:wait.rc 1 modify wait:2s 2>&1}; +$output = qx{../src/task rc:wait.rc ls 2>&1}; like ($output, qr/nowait/ms, 'non-waiting task visible'); unlike ($output, qr/yeswait/ms, 'waiting task invisible'); diag ("3 second delay"); sleep 3; -$output = qx{../src/task rc:wait.rc ls}; +$output = qx{../src/task rc:wait.rc ls 2>&1}; like ($output, qr/nowait/ms, 'non-waiting task still visible'); like ($output, qr/yeswait/ms, 'waiting task now visible'); -qx{../src/task rc:wait.rc add wait:tomorrow tomorrow}; -$output = qx{../src/task rc:wait.rc ls}; +qx{../src/task rc:wait.rc add wait:tomorrow tomorrow 2>&1}; +$output = qx{../src/task rc:wait.rc ls 2>&1}; unlike ($output, qr/tomorrow/ms, 'waiting task invisible'); -$output = qx{../src/task rc:wait.rc all status:waiting wait:tomorrow}; +$output = qx{../src/task rc:wait.rc all status:waiting wait:tomorrow 2>&1}; like ($output, qr/tomorrow/ms, 'waiting task visible when specifically queried'); $output = qx{../src/task rc:wait.rc add Complain due:today wait:tomorrow 2>&1 >/dev/null};