Make this test actually *work*...
This commit is contained in:
parent
4a178080ab
commit
afea89cace
@ -1,8 +1,8 @@
|
||||
#!/bin/ksh
|
||||
|
||||
function test_factor {
|
||||
echo "Testing: `eval factor $1`"
|
||||
res=`eval factor $1 2>&1`
|
||||
echo "Testing: \`/usr/games/factor $1\`"
|
||||
res=`/usr/games/factor $1 2>&1`
|
||||
if [ "$res" != "$2" ]; then
|
||||
echo "Expected \"$2\", got \"$res\" from factor: `eval echo $1`"
|
||||
exit 1
|
||||
@ -14,5 +14,6 @@ function test_factor {
|
||||
|
||||
# Test overflow cases
|
||||
test_factor '8675309' '8675309: 8675309'
|
||||
test_factor '6172538568' '6172538568: 2 2 2 3 7 17 2161253'
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user