diff tests/0004/run-test.sh @ 63:cee75159c0bc

Improve test 0004 now that it's passing: actually check for correct output, not just number of results.
author mas01cr
date Thu, 20 Sep 2007 14:37:55 +0000
parents a7aad4c50cb9
children 3c7c8b84e4f3 2cc06e5b05a5
line wrap: on
line diff
--- a/tests/0004/run-test.sh	Thu Sep 20 14:29:30 2007 +0000
+++ b/tests/0004/run-test.sh	Thu Sep 20 14:37:55 2007 +0000
@@ -17,17 +17,23 @@
 floatstring 0 0.5 >> testquery
 
 ${AUDIODB} -d testdb -Q point -f testquery > testoutput
-wc -l testoutput | grep 2
+echo testfeature 0.5 0 0 > test-expected-output
+echo testfeature 0 0 1 >> test-expected-output
+cmp testoutput test-expected-output
 ${AUDIODB} -d testdb -Q point -f testquery -n 1 > testoutput
-wc -l testoutput | grep 1
+echo testfeature 0.5 0 0 > test-expected-output
+cmp testoutput test-expected-output
 
 echo "query point (0.5,0.0)"
 intstring 2 > testquery
 floatstring 0.5 0 >> testquery
 
 ${AUDIODB} -d testdb -Q point -f testquery > testoutput
-wc -l testoutput | grep 2
+echo testfeature 0.5 0 1 > test-expected-output
+echo testfeature 0 0 0 >> test-expected-output
+cmp testoutput test-expected-output
 ${AUDIODB} -d testdb -Q point -f testquery -n 1 > testoutput
-wc -l testoutput | grep 1
+echo testfeature 0.5 0 1 > test-expected-output
+cmp testoutput test-expected-output
 
 exit 104