summaryrefslogtreecommitdiff
path: root/conformance/dotest
blob: 3ffe06b9cae20d36cfe663e55a80bdd263d80363 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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