mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Upgraded to use the new template.
This commit is contained in:
parent
70b80331e6
commit
1dba267120
1 changed files with 7 additions and 5 deletions
|
@ -29,13 +29,15 @@ use strict;
|
|||
use warnings;
|
||||
use Test::More tests => 5;
|
||||
|
||||
my $ut = 'bug.calc.t';
|
||||
|
||||
# '15min' is seen as '15', 'min', not '15min' duration.
|
||||
my $output = qx{../src/calc --debug --noambiguous 15min};
|
||||
unlike ($output, qr/token infix '15' Date/, 'Misinterpretation: 15min -> 15');
|
||||
unlike ($output, qr/token infix 'min' Identifier/, 'Misinterpretation: 15min -> m');
|
||||
unlike ($output, qr/Error: Unexpected stack size: 2/, 'Unexpected stack size');
|
||||
like ($output, qr/\[0\] eval push 'PT15M'/, '15min -> push PT15M');
|
||||
like ($output, qr/^PT15M$/ms, '15min -> PT15M');
|
||||
unlike ($output, qr/token infix '15' Date/, "$ut: Misinterpretation: 15min -> 15");
|
||||
unlike ($output, qr/token infix 'min' Identifier/, "$ut: Misinterpretation: 15min -> m");
|
||||
unlike ($output, qr/Error: Unexpected stack size: 2/, "$ut: Unexpected stack size");
|
||||
like ($output, qr/\[0\] eval push 'PT15M'/, "$ut: 15min -> push PT15M");
|
||||
like ($output, qr/^PT15M$/ms, "$ut: 15min -> PT15M");
|
||||
|
||||
exit 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue