Mercurial > hg > audiodb
annotate tests/0003/run-test.sh @ 107:1521d46bc1ac audiodb-debian
Merge trunk changes -r96:122 to audiodb-debian branch.
(and new version in debian/changelog)
author | mas01cr |
---|---|
date | Fri, 05 Oct 2007 11:45:03 +0000 |
parents | 06922d637752 |
children | 15b8ff55ea5b |
rev | line source |
---|---|
mas01cr@78 | 1 #! /bin/sh |
mas01cr@78 | 2 |
mas01cr@78 | 3 . ../test-utils.sh |
mas01cr@78 | 4 |
mas01cr@78 | 5 if [ -f testdb ]; then rm -f testdb; fi |
mas01cr@78 | 6 |
mas01cr@78 | 7 ${AUDIODB} -d testdb -N |
mas01cr@78 | 8 |
mas01cr@78 | 9 # We could contemplate putting the test feature (and the expected |
mas01cr@78 | 10 # query output) under svn control if we trust its binary file |
mas01cr@78 | 11 # handling. |
mas01cr@78 | 12 |
mas01cr@78 | 13 # FIXME: endianness! |
mas01cr@78 | 14 intstring 1 > testfeature |
mas01cr@78 | 15 floatstring 1 >> testfeature |
mas01cr@78 | 16 |
mas01cr@78 | 17 ${AUDIODB} -d testdb -I -f testfeature |
mas01cr@78 | 18 |
mas01cr@78 | 19 ${AUDIODB} -d testdb -Q point -f testfeature > test-query-output |
mas01cr@78 | 20 |
mas01cr@78 | 21 echo testfeature 1 0 0 > test-expected-query-output |
mas01cr@78 | 22 |
mas01cr@78 | 23 cmp test-query-output test-expected-query-output |
mas01cr@78 | 24 |
mas01cr@78 | 25 # failure cases |
mas01cr@78 | 26 expect_clean_error_exit ${AUDIODB} -d testdb -I |
mas01cr@78 | 27 expect_clean_error_exit ${AUDIODB} -d testdb -f testfeature |
mas01cr@78 | 28 expect_clean_error_exit ${AUDIODB} -I -f testfeature |
mas01cr@78 | 29 expect_clean_error_exit ${AUDIODB} -d testdb -Q notpoint -f testfeature |
mas01cr@78 | 30 expect_clean_error_exit ${AUDIODB} -Q point -f testfeature |
mas01cr@78 | 31 |
mas01cr@78 | 32 exit 104 |