mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit tests
- shell.t addapted to new commandline parsing
This commit is contained in:
parent
993844d600
commit
4a87ab74f4
1 changed files with 4 additions and 2 deletions
|
@ -35,17 +35,19 @@ if (open my $fh, '>', 'shell.rc')
|
|||
{
|
||||
print $fh "data.location=.\n",
|
||||
"shell.prompt=testprompt>\n",
|
||||
"defaultwidth=0\n",
|
||||
"default.command=ls\n";
|
||||
close $fh;
|
||||
ok (-r 'shell.rc', 'Created shell.rc');
|
||||
}
|
||||
|
||||
# Test the prompt.
|
||||
my $output = qx{echo "-- \\nquit\\n" | ../src/task rc:shell.rc shell};
|
||||
my $output = qx{echo "-- quit" | ../src/task rc:shell.rc shell};
|
||||
like ($output, qr/testprompt>/, 'custom prompt is being used');
|
||||
|
||||
# Test a simple add, then info.
|
||||
$output = qx{echo "-- add foo\ninfo 1\n" | ../src/task rc:shell.rc shell};
|
||||
qx{echo "-- add foo" | ../src/task rc:shell.rc shell};
|
||||
$output = qx{echo "-- 1 info" | ../src/task rc:shell.rc shell};
|
||||
like ($output, qr/Description\s+foo/, 'add/info working');
|
||||
|
||||
unlink 'shell.rc';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue