Add non-regression testing infrastructures and first tests.
[SXSI/xpathcomp.git] / tests / non_regression_tests / gen_output.sh
1 #!/bin/sh
2
3
4 for i in *.xp
5 do
6     out=`basename "$i" .xp`.output
7     doc=$(cat "$i" | cut -f 1 -d ',')
8     if grep -q -- -c "$i" >/dev/null 2>&1
9     then
10         opt="-c"
11     else
12         opt=""
13     fi
14     query=$(cat "$i" | cut -f 3 -d ',')
15     ../scripts/xpath.sh $opt "$query" ../docs/"$doc".xml > "$out"
16 done