From b657e810d6bf70440897e754bdc7f6a3c5552297 Mon Sep 17 00:00:00 2001 From: "Evgeniy A. Dushistov" Date: Thu, 2 Jun 2016 17:09:30 +0300 Subject: [PATCH] fix t_utf8input on other then my machine --- CMakeLists.txt | 2 +- tests/rus-eng-stardict-2.4.2/1.xdxf.dict | 2 ++ tests/rus-eng-stardict-2.4.2/1.xdxf.idx | Bin 0 -> 23 bytes tests/rus-eng-stardict-2.4.2/1.xdxf.idx.oft | Bin 0 -> 38 bytes tests/rus-eng-stardict-2.4.2/1.xdxf.ifo | 8 ++++++++ tests/t_utf8input | 9 ++++++--- tests/t_utf8output | 2 ++ 7 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 tests/rus-eng-stardict-2.4.2/1.xdxf.dict create mode 100644 tests/rus-eng-stardict-2.4.2/1.xdxf.idx create mode 100644 tests/rus-eng-stardict-2.4.2/1.xdxf.idx.oft create mode 100644 tests/rus-eng-stardict-2.4.2/1.xdxf.ifo diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ce3269..8f13200 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,4 +144,4 @@ if (BUILD_TESTS) add_sdcv_shell_test(t_utf8input) add_sdcv_shell_test(t_datadir) -endif () +endif (BUILD_TESTS) diff --git a/tests/rus-eng-stardict-2.4.2/1.xdxf.dict b/tests/rus-eng-stardict-2.4.2/1.xdxf.dict new file mode 100644 index 0000000..125ecd8 --- /dev/null +++ b/tests/rus-eng-stardict-2.4.2/1.xdxf.dict @@ -0,0 +1,2 @@ +человек +man \ No newline at end of file diff --git a/tests/rus-eng-stardict-2.4.2/1.xdxf.idx b/tests/rus-eng-stardict-2.4.2/1.xdxf.idx new file mode 100644 index 0000000000000000000000000000000000000000..93df80efb7bd2732817e0f00e83c8bcc2fab1bc1 GIT binary patch literal 23 YcmccEeqrl{-52&<*aW0^F+hPN0IfF)p#T5? literal 0 HcmV?d00001 diff --git a/tests/rus-eng-stardict-2.4.2/1.xdxf.idx.oft b/tests/rus-eng-stardict-2.4.2/1.xdxf.idx.oft new file mode 100644 index 0000000000000000000000000000000000000000..bd5c857158ce9e288f07f6cdbe377c9ed82e942b GIT binary patch literal 38 qcmWG8Ni1^7OfFF`R&Y*C&Pdf!2um$0&dkrVQZUdnWB>wjAO-;MvkBh- literal 0 HcmV?d00001 diff --git a/tests/rus-eng-stardict-2.4.2/1.xdxf.ifo b/tests/rus-eng-stardict-2.4.2/1.xdxf.ifo new file mode 100644 index 0000000..fa86d41 --- /dev/null +++ b/tests/rus-eng-stardict-2.4.2/1.xdxf.ifo @@ -0,0 +1,8 @@ +StarDict's dict ifo file +version=2.4.2 +wordcount=1 +idxfilesize=23 +bookname=Sample 1 test dictionary +date=2016.06.02 +sametypesequence=x +description=Copyright: GNU Public License.; Version: 0.1 diff --git a/tests/t_utf8input b/tests/t_utf8input index c1b3c77..1ad8360 100755 --- a/tests/t_utf8input +++ b/tests/t_utf8input @@ -1,9 +1,12 @@ #!/bin/sh -# This test is dirty hack: if you want try it -# make sure that you have not small Russian dictionary, like mueller 7 GPL -# or replace человек by something else + +set -e PATH_TO_SDCV="$1" +TESTS_DIR="$2" + +mkdir -p "${HOME}"/.stardict/dic +cp -R "${TESTS_DIR}/rus-eng-stardict-2.4.2" "${HOME}"/.stardict/dic/ unset SDCV_PAGER export LANG=ru_RU.KOI8-R diff --git a/tests/t_utf8output b/tests/t_utf8output index f0ca1b9..4d04778 100755 --- a/tests/t_utf8output +++ b/tests/t_utf8output @@ -1,5 +1,7 @@ #!/bin/sh +set -e + export LANG=ru_RU.KOI8-R unset SDCV_PAGER