Files
sdcv/tests/t_datadir
Evgeniy Dushistov 9121ccf20e Import Michal Čihař ( nijel ) patch:
Tescases fail with POSIX /bin/sh, attached patch fixes it
2010-08-01 20:42:04 +00:00

15 lines
332 B
Bash
Executable File

#!/bin/sh
unset SDCV_PAGER
have=`../src/sdcv --data-dir ./ -l | wc -l`
have=$(($have-1))
ndicts=`find "${HOME}"/.stardict/dic -name "*.ifo" -print | wc -l`
ndicts=$(($ndicts+1))
if [ $have -ne $ndicts ]; then
ndicts=$(($ndicts-1))
echo "test failed: sdcv says: we have: $have, but really we have: $ndicts" >&2
exit 1
fi
exit 0