#!/bin/sh # Generate and test single tests, and archive the nonconforming ones. # First command line parameter is the lenght of test in bytes, default is 10. path=`dirname $(which $0)` trap 'rm -f $path/test.{in,out,ref} &> /dev/null ; exit' INT while true; do $path/findbad $@ echo -e "bad test found!!!\7" if ! test -d $path/badtests; then mkdir $path/badtests fi cp $path/test.in $path/badtests/$RANDOM.in done