Add non-regression testing infrastructures and first tests.
[SXSI/xpathcomp.git] / tests / non_regression_tests / test.sh
1 #!/bin/sh
2
3 MAIN=../../main.native
4 for i in *count*.xp
5 do
6     echo "$i"-------------------
7     ref=`basename "$i" .xp`.output
8     doc=$(cat "$i" | cut -f 1 -d ',')
9     options=$(cat "$i" | cut -f 2 -d ',')
10     query=$(cat "$i" | cut -f 3 -d ',')
11     rm -f tmp
12     $MAIN $options "../docs/$doc".xml "$query" /dev/stdout 2>/dev/null
13     cat "$ref"
14     echo -----------------------------------------
15 done