diff options
author | Jim Meyering <jim@meyering.net> | 2001-08-18 16:27:46 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-08-18 16:27:46 +0000 |
commit | bc70df09bb771b1a86a4759be94504510f28c09e (patch) | |
tree | 6265c6183ad783a9f9d83b0ee623fc50cf5c812e /tests/expr/basic | |
parent | 2f327c7f342a738a362373f4fc411ad40f0e8386 (diff) | |
download | coreutils-bc70df09bb771b1a86a4759be94504510f28c09e.tar.xz |
add more
Diffstat (limited to 'tests/expr/basic')
-rwxr-xr-x | tests/expr/basic | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/expr/basic b/tests/expr/basic index 812422e3d..578857e5f 100755 --- a/tests/expr/basic +++ b/tests/expr/basic @@ -26,14 +26,17 @@ my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n"; my @Tests = ( - ['invalid-a', '3 + -', {ERR => "$prog: non-numeric argument\n"}, - {EXIT => 1}], - ['a', '5 + 6', {OUT => '11'}], + ['b', '5 - 6', {OUT => '-1'}], + ['c', '5 \* 6', {OUT => '30'}], + ['d', '100 / 6', {OUT => '16'}], + ['e', '100 % 6', {OUT => '4'}], + + ['fail-a', '3 + -', {ERR => "$prog: non-numeric argument\n"}, + {EXIT => 2}], ); -# Prepend the command line argument and append a newline to end -# of each expected `OUT' string. +# Append a newline to end of each expected `OUT' string. my $t; foreach $t (@Tests) { @@ -41,7 +44,7 @@ foreach $t (@Tests) my $e; foreach $e (@$t) { - $e->{OUT} = "$arg1: $e->{OUT}\n" + $e->{OUT} .= "\n" if ref $e eq 'HASH' and exists $e->{OUT}; } } |