From 4a87ab74f4b4f4f0ef1bde5e643b1721eaae11d4 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Sat, 24 Sep 2011 21:39:57 +0200 Subject: [PATCH] Unit tests - shell.t addapted to new commandline parsing --- test/shell.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/shell.t b/test/shell.t index 61fda9b6e..8a4118857 100755 --- a/test/shell.t +++ b/test/shell.t @@ -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';