parent
874eb4f3a2
commit
341d626870
@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
EXIT_CODE=0
|
||||||
|
|
||||||
|
run_test()
|
||||||
|
{
|
||||||
|
echo -n " $1"
|
||||||
|
cat $2 | ./ex19 >/dev/null
|
||||||
|
if [[ $? -eq 0 ]]
|
||||||
|
then
|
||||||
|
echo " ... OK"
|
||||||
|
else
|
||||||
|
echo " ... FAIL"
|
||||||
|
EXIT_CODE=1
|
||||||
|
fi
|
||||||
|
rm -f $2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp_01=`mktemp`
|
||||||
|
cat > $tmp_01 <<EOF
|
||||||
|
l
|
||||||
|
n
|
||||||
|
w
|
||||||
|
n
|
||||||
|
w
|
||||||
|
n
|
||||||
|
w
|
||||||
|
e
|
||||||
|
w
|
||||||
|
e
|
||||||
|
e
|
||||||
|
e
|
||||||
|
s
|
||||||
|
s
|
||||||
|
w
|
||||||
|
w
|
||||||
|
n
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
EOF
|
||||||
|
|
||||||
|
tmp_02=`mktemp`
|
||||||
|
cat > $tmp_02 <<EOF
|
||||||
|
l
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
a
|
||||||
|
n
|
||||||
|
hutesoahutesohas
|
||||||
|
999999999999
|
||||||
|
l
|
||||||
|
n
|
||||||
|
n
|
||||||
|
n
|
||||||
|
e
|
||||||
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
run_test '01' $tmp_01
|
||||||
|
run_test '02' $tmp_02
|
||||||
|
|
||||||
|
|
||||||
|
exit $EXIT_CODE
|
Loading…
Reference in new issue