comparison tests/0008/run-test.sh @ 56:c02b5a6104a9

Add tests for single-point tracks searched by a single query point.
author mas01cr
date Thu, 20 Sep 2007 11:29:15 +0000
parents
children fe4dc39b2dd7
comparison
equal deleted inserted replaced
55:32f8b7845b30 56:c02b5a6104a9
1 #! /bin/sh
2
3 . ../test-utils.sh
4
5 if [ -f testdb ]; then rm -f testdb; fi
6
7 ${AUDIODB} -d testdb -N
8
9 intstring 2 > testfeature01
10 floatstring 0 1 >> testfeature01
11 intstring 2 > testfeature10
12 floatstring 1 0 >> testfeature10
13
14 ${AUDIODB} -d testdb -I -f testfeature01
15 ${AUDIODB} -d testdb -I -f testfeature10
16
17 # sequence queries require L2NORM
18 ${AUDIODB} -d testdb -L
19
20 echo "query point (0.0,0.5)"
21 intstring 2 > testquery
22 floatstring 0 0.5 >> testquery
23
24 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery > testoutput
25 echo testfeature01 0 0 0 > test-expected-output
26 echo testfeature10 2 0 0 >> test-expected-output
27 cmp testoutput test-expected-output
28 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 > testoutput
29 echo testfeature01 0 0 0 > test-expected-output
30 cmp testoutput test-expected-output
31
32 echo "query point (0.5,0.0)"
33 intstring 2 > testquery
34 floatstring 0.5 0 >> testquery
35
36 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery > testoutput
37 echo testfeature10 0 0 0 > test-expected-output
38 echo testfeature01 2 0 0 >> test-expected-output
39 cmp testoutput test-expected-output
40 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 > testoutput
41 echo testfeature10 0 0 0 > test-expected-output
42 cmp testoutput test-expected-output
43
44 exit 104