55817a1
Fixes tests so that they can be executed using dash as /bin/sh.
55817a1
http://sourceforge.net/tracker/index.php?func=detail&aid=2125959&group_id=122858&atid=694730
55817a1
--- a/tests/t_datadir
55817a1
+++ b/tests/t_datadir
55817a1
@@ -2,11 +2,11 @@
55817a1
 
55817a1
 unset SDCV_PAGER
55817a1
 have=`../src/sdcv --data-dir ./ -l | wc -l`
55817a1
-let have=have-1
55817a1
+have=$(($have-1))
55817a1
 ndicts=`find "${HOME}"/.stardict/dic -name "*.ifo" -print | wc -l`
55817a1
-let ndicts=ndicts+1
55817a1
+ndicts=$(($ndicts+1))
55817a1
 if [ $have -ne $ndicts ]; then
55817a1
-	let ndicts=ndicts-1
55817a1
+	ndicts=$(($ndicts-1))
55817a1
 	echo "test failed: sdcv says: we have: $have, but really we have: $ndicts" >&2
55817a1
 	exit 1
55817a1
 fi
55817a1
--- a/tests/t_list
55817a1
+++ b/tests/t_list
55817a1
@@ -1,10 +1,10 @@
55817a1
 #!/bin/sh
55817a1
 
55817a1
 ndicts=`../src/sdcv -l | wc -l`
55817a1
-let ndicts=ndicts-1
55817a1
+ndicts=$(($ndicts-1))
55817a1
 ncom=`find /usr/share/stardict/dic -name "*.ifo" | wc -l`
55817a1
 nspe=`find "${HOME}"/.stardict/dic -name "*.ifo" | wc -l`
55817a1
-let nmy=ncom+nspe
55817a1
+nmy=$(($ncom+$nspe))
55817a1
 
55817a1
 if [ $nmy -ne $ndicts ]; then
55817a1
 	echo "should be: $nmy, we have: $ndicts" >&2
55817a1
--- a/tests/t_utf8input
55817a1
+++ b/tests/t_utf8input
55817a1
@@ -9,13 +9,13 @@
55817a1
 "
55817a1
 j=0
55817a1
 for i in `../src/sdcv --utf8-input -n человек 2>&1;; do
55817a1
-	let j=j+1
55817a1
+	j=$(($j+1))
55817a1
 	if [ $j -ne 1 ]; then
55817a1
 		break;
55817a1
 	fi
55817a1
 done
55817a1
 
55817a1
-if [ $j -eq 1 ]; then
55817a1
+if [ $j -ne 1 ]; then
55817a1
 	echo "empty results of search: test failed" >&2
55817a1
 	exit 1
55817a1
 fi