]>
git.saurik.com Git - bison.git/blob - examples/calc++/test
2aa917bc070f5ef3c3e7c6559232cb5df5dbf679
3 test -z "$VERBOSE" && {
10 # Number of the current test.
13 # Exit status of this script.
16 # run EXPECTED-EXIT-STATUS EXPECTED-OUTPUT [PARSER-OPTIONS]
17 # ---------------------------------------------------------
20 # Effective and expected exit status.
25 .
/calc
++ "$@" input
>out_eff
27 local out_eff
=`cat out_eff`
28 if test $sta_eff -eq $sta_exp; then
29 if test "$out_eff" = "$out_exp"; then
30 printf "$me: PASS: %2d\n" $number
32 printf "$me: FAIL: %2d (expected output: %s, effective: %s\n" \
33 $number "$out_exp" "$out_eff"
37 printf "$me: FAIL: %2d (expected status: %d, effective: %d\n" \
38 $number $sta_exp $sta_eff
41 number
=`expr $number + 1`