3 # Copyright © 2012 Nick Bowler
5 # Check randomdecl's output to make sure it actually generates a variety
8 # License WTFPL2: Do What The Fuck You Want To Public License, version 2.
9 # This is free software: you are free to do what the fuck you want to.
10 # There is NO WARRANTY, to the extent permitted by law.
12 randomdecl=test/randomdecl$EXEEXT
13 test -x $randomdecl || exit 77
16 sed -f tests/randomdecl-sanity.sed || { echo "result=fail"; return 1; }
19 printf '%s: randomized test using RANDOMSEED=%d\n' "$0" "$RANDOMSEED"
23 { $randomdecl -E -s "$RANDOMSEED" 3>&-
24 echo gen_status=$? >&3
28 eval_cmd=`sed -ne 's/^\(.*\)=yes #\(.*\)$/\
29 test x"$\1" = x"yes" || { echo no \2; result=fail; }/p' \
30 tests/randomdecl-sanity.sed`
33 if test x"$result" != x"pass"; then
34 printf '%s: test failed\n' "$0"