comparison tests/0032/run-test.sh @ 197:a7df1dc971ef audiodb-debian

Merge trunk changes -r259:260 into audiodb-debian branch (+ new debian/changelog version)
author mas01cr
date Fri, 23 Nov 2007 11:18:33 +0000
parents
children 3c7c8b84e4f3 2cc06e5b05a5
comparison
equal deleted inserted replaced
195:6da72f0e086b 197:a7df1dc971ef
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 echo "query point (0.0,0.5)"
18 intstring 2 > testquery
19 floatstring 0 0.5 >> testquery
20
21 ${AUDIODB} -d testdb -Q track -l 1 -f testquery > testoutput
22 echo testfeature01 0.5 0 0 > test-expected-output
23 echo testfeature10 0 0 0 >> test-expected-output
24 cmp testoutput test-expected-output
25 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K /dev/null > testoutput
26 cat /dev/null > test-expected-output
27 cmp testoutput test-expected-output
28
29 echo testfeature01 > testkl.txt
30 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt > testoutput
31 echo testfeature01 0.5 0 0 > test-expected-output
32 cmp testoutput test-expected-output
33
34 echo testfeature10 > testkl.txt
35 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt > testoutput
36 echo testfeature10 0 0 0 > test-expected-output
37 cmp testoutput test-expected-output
38
39 echo testfeature10 > testkl.txt
40 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt -r 1 > testoutput
41 echo testfeature10 0 0 0 > test-expected-output
42 cmp testoutput test-expected-output
43
44 echo "query point (0.5,0.0)"
45 intstring 2 > testquery
46 floatstring 0.5 0 >> testquery
47
48 ${AUDIODB} -d testdb -Q track -l 1 -f testquery > testoutput
49 echo testfeature10 0.5 0 0 > test-expected-output
50 echo testfeature01 0 0 0 >> test-expected-output
51 cmp testoutput test-expected-output
52 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K /dev/null > testoutput
53 cat /dev/null > test-expected-output
54 cmp testoutput test-expected-output
55
56 echo testfeature10 > testkl.txt
57 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt > testoutput
58 echo testfeature10 0.5 0 0 > test-expected-output
59 cmp testoutput test-expected-output
60
61 echo testfeature01 > testkl.txt
62 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt > testoutput
63 echo testfeature01 0 0 0 > test-expected-output
64 cmp testoutput test-expected-output
65
66 echo testfeature01 > testkl.txt
67 ${AUDIODB} -d testdb -Q track -l 1 -f testquery -K testkl.txt -r 1 > testoutput
68 echo testfeature01 0 0 0 > test-expected-output
69 cmp testoutput test-expected-output
70
71 exit 104