X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=tests%2Fnon_regression_tests%2Ftest.sh;h=2024bfff2406aca2a65354db4e5719fa290922a2;hb=f46bc59b79765484e3c5533f9014c0dd6ad493ee;hp=4b5e442c34139822ece62be22b77311b3f099c28;hpb=4694574a0dd67cab15d8408007a9665928e6a776;p=SXSI%2Fxpathcomp.git diff --git a/tests/non_regression_tests/test.sh b/tests/non_regression_tests/test.sh index 4b5e442..2024bff 100755 --- a/tests/non_regression_tests/test.sh +++ b/tests/non_regression_tests/test.sh @@ -1,15 +1,31 @@ #!/bin/sh MAIN=../../main.native -for i in *count*.xp +for i in *.xp do - echo "$i"------------------- + echo -n Test "$i" "..." ref=`basename "$i" .xp`.output doc=$(cat "$i" | cut -f 1 -d ',') options=$(cat "$i" | cut -f 2 -d ',') query=$(cat "$i" | cut -f 3 -d ',') rm -f tmp - $MAIN $options "../docs/$doc".xml "$query" /dev/stdout 2>/dev/null - cat "$ref" - echo ----------------------------------------- + if [ -f "../docs/$doc".srx ] + then + input="../docs/$doc".srx + else + input="../docs/$doc".xml + fi + $MAIN $options "$input" "$query" tmp 2>/dev/null + if diff -q -w -B tmp "$ref" + then + echo " ok" + else + echo failure + echo ----------------------- + echo Difference: + diff -w -B tmp "$ref" + echo ----------------------- + echo + fi + done \ No newline at end of file