comparison tests/0023/run-test.sh @ 126:b9f1c375f28a audiodb-debian

Merge trunk changes -r143:145 to audiodb-debian branch (+ new debian/changelog version)
author mas01cr
date Wed, 17 Oct 2007 14:52:39 +0000
parents
children abfb26e08d9c
comparison
equal deleted inserted replaced
123:8d0942525fab 126:b9f1c375f28a
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 cat > testfeaturefiles <<EOF
15 testfeature01
16 testfeature10
17 EOF
18
19 ${AUDIODB} -d testdb -B -F testfeaturefiles
20
21 # sequence queries require L2NORM
22 ${AUDIODB} -d testdb -L
23
24 echo "query point (0.0,0.5)"
25 intstring 2 > testquery
26 floatstring 0 0.5 >> testquery
27 floatstring 0.5 0 >> testquery
28
29 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -p 0 > testoutput
30 echo testfeature01 0 0 0 > test-expected-output
31 echo testfeature10 2 0 0 >> test-expected-output
32 cmp testoutput test-expected-output
33 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -p 0 > testoutput
34 echo testfeature01 0 0 0 > test-expected-output
35 cmp testoutput test-expected-output
36
37 echo "query point (0.5,0.0)"
38
39 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -p 1 > testoutput
40 echo testfeature10 0 1 0 > test-expected-output
41 echo testfeature01 2 1 0 >> test-expected-output
42 cmp testoutput test-expected-output
43 ${AUDIODB} -d testdb -Q sequence -l 1 -f testquery -r 1 -p 1 > testoutput
44 echo testfeature10 0 1 0 > test-expected-output
45 cmp testoutput test-expected-output
46
47 exit 104