mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-16 18:01:54 +00:00
Import Michal Čihař ( nijel ) patch:
Tescases fail with POSIX /bin/sh, attached patch fixes it
This commit is contained in:
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
unset SDCV_PAGER
|
unset SDCV_PAGER
|
||||||
have=`../src/sdcv --data-dir ./ -l | wc -l`
|
have=`../src/sdcv --data-dir ./ -l | wc -l`
|
||||||
let have=have-1
|
have=$(($have-1))
|
||||||
ndicts=`find "${HOME}"/.stardict/dic -name "*.ifo" -print | wc -l`
|
ndicts=`find "${HOME}"/.stardict/dic -name "*.ifo" -print | wc -l`
|
||||||
let ndicts=ndicts+1
|
ndicts=$(($ndicts+1))
|
||||||
if [ $have -ne $ndicts ]; then
|
if [ $have -ne $ndicts ]; then
|
||||||
let ndicts=ndicts-1
|
ndicts=$(($ndicts-1))
|
||||||
echo "test failed: sdcv says: we have: $have, but really we have: $ndicts" >&2
|
echo "test failed: sdcv says: we have: $have, but really we have: $ndicts" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
ndicts=`../src/sdcv -l | wc -l`
|
ndicts=`../src/sdcv -l | wc -l`
|
||||||
let ndicts=ndicts-1
|
ndicts=$(($ndicts-1))
|
||||||
ncom=`find /usr/share/stardict/dic -name "*.ifo" | wc -l`
|
ncom=`find /usr/share/stardict/dic -name "*.ifo" | wc -l`
|
||||||
nspe=`find "${HOME}"/.stardict/dic -name "*.ifo" | wc -l`
|
nspe=`find "${HOME}"/.stardict/dic -name "*.ifo" | wc -l`
|
||||||
let nmy=ncom+nspe
|
nmy=$(($ncom+$nspe))
|
||||||
|
|
||||||
if [ $nmy -ne $ndicts ]; then
|
if [ $nmy -ne $ndicts ]; then
|
||||||
echo "should be: $nmy, we have: $ndicts" >&2
|
echo "should be: $nmy, we have: $ndicts" >&2
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ IFS="
|
|||||||
"
|
"
|
||||||
j=0
|
j=0
|
||||||
for i in `../src/sdcv --utf8-input -n человек 2>&1`; do
|
for i in `../src/sdcv --utf8-input -n человек 2>&1`; do
|
||||||
let j=j+1
|
j=$(($j+1))
|
||||||
if [ $j -ne 1 ]; then
|
if [ $j -ne 1 ]; then
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user