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 "$srcdir/tests/randomdecl-sanity.sed" \
17 || { echo "result=fail"; return 1; }
20 printf '%s: randomized test using RANDOMSEED=%d\n' "$0" "$RANDOMSEED"
24 { $randomdecl -E -s "$RANDOMSEED" 3>&-
25 echo gen_status=$? >&3
29 eval_cmd=`sed -ne 's/^\(.*\)=yes #\(.*\)$/\
30 test x"$\1" = x"yes" || { echo no \2; result=fail; }/p' \
31 tests/randomdecl-sanity.sed`
34 if test x"$result" != x"pass"; then
35 printf '%s: test failed\n' "$0"