mas01cr@277: #! /bin/bash mas01cr@78: mas01cr@78: . ../test-utils.sh mas01cr@78: mas01cr@78: if [ -f testdb ]; then rm -f testdb; fi mas01cr@78: mas01cr@78: ${AUDIODB} -d testdb -N mas01cr@78: mas01cr@243: # point query now implemented as sequence search mas01cr@243: ${AUDIODB} -d testdb -L mas01cr@243: mas01cr@78: # We could contemplate putting the test feature (and the expected mas01cr@78: # query output) under svn control if we trust its binary file mas01cr@78: # handling. mas01cr@78: mas01cr@78: # FIXME: endianness! mas01cr@78: intstring 1 > testfeature mas01cr@78: floatstring 1 >> testfeature mas01cr@78: mas01cr@78: ${AUDIODB} -d testdb -I -f testfeature mas01cr@78: mas01cr@78: ${AUDIODB} -d testdb -Q point -f testfeature > test-query-output mas01cr@78: mas01cr@78: echo testfeature 1 0 0 > test-expected-query-output mas01cr@78: mas01cr@78: cmp test-query-output test-expected-query-output mas01cr@78: mas01cr@78: # failure cases mas01cr@78: expect_clean_error_exit ${AUDIODB} -d testdb -I mas01cr@78: expect_clean_error_exit ${AUDIODB} -d testdb -f testfeature mas01cr@78: expect_clean_error_exit ${AUDIODB} -I -f testfeature mas01cr@78: expect_clean_error_exit ${AUDIODB} -d testdb -Q notpoint -f testfeature mas01cr@78: expect_clean_error_exit ${AUDIODB} -Q point -f testfeature mas01cr@78: mas01cr@78: exit 104