diff options
author | Vladimir Yatsemirski <7catssmile@gmail.com> | 2012-12-27 18:27:13 +0100 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-12-27 18:27:33 +0100 |
commit | 18bc18abd0943f7bac47531e4300c912a8bd769a (patch) | |
tree | e89c0c8fa95101d2034aae924b680ef7874dfd66 /misc/sdcv/patches/09_fix-tests.patch | |
parent | 7941012fb8d958417582100e82342eafbdeedca6 (diff) | |
download | slackbuilds-18bc18abd0943f7bac47531e4300c912a8bd769a.tar.gz |
misc/sdcv: Added (console dictionary application).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'misc/sdcv/patches/09_fix-tests.patch')
-rw-r--r-- | misc/sdcv/patches/09_fix-tests.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/misc/sdcv/patches/09_fix-tests.patch b/misc/sdcv/patches/09_fix-tests.patch new file mode 100644 index 0000000000..cc93890280 --- /dev/null +++ b/misc/sdcv/patches/09_fix-tests.patch @@ -0,0 +1,53 @@ +From: Michal Čihař <nijel@debian.org> +Subject: Fixes tests so that they can be executed using dash as /bin/sh. +Bug: http://sourceforge.net/tracker/index.php?func=detail&aid=2125959&group_id=122858&atid=694730 +--- a/tests/t_datadir ++++ b/tests/t_datadir +@@ -2,11 +2,11 @@ + + unset SDCV_PAGER + 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` +-let ndicts=ndicts+1 ++ndicts=$(($ndicts+1)) + 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 + exit 1 + fi +--- a/tests/t_list ++++ b/tests/t_list +@@ -1,10 +1,10 @@ + #!/bin/sh + + ndicts=`../src/sdcv -l | wc -l` +-let ndicts=ndicts-1 ++ndicts=$(($ndicts-1)) + ncom=`find /usr/share/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 + echo "should be: $nmy, we have: $ndicts" >&2 +--- a/tests/t_utf8input ++++ b/tests/t_utf8input +@@ -9,13 +9,13 @@ + " + j=0 + for i in `../src/sdcv --utf8-input -n человек 2>&1`; do +- let j=j+1 ++ j=$(($j+1)) + if [ $j -ne 1 ]; then + break; + fi + done + +-if [ $j -eq 1 ]; then ++if [ $j -ne 1 ]; then + echo "empty results of search: test failed" >&2 + exit 1 + fi |