#!/bin/sh
# Generate and test a single test data.
generator="test_gen_rand"
path=`dirname $0`
trap 'rm -f $path/test.{in,out,ref} &> /dev/null ; exit' INT
if ! test -f "$path/$generator"; then
gcc -o $path/$generator $path/$generator.c
fi
$path/$generator $1 | sed 's|\\\\||g' > $path/test.in
shift
$path/test "$@" $path/test.in