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 0000000..93df80e Binary files /dev/null and b/tests/rus-eng-stardict-2.4.2/1.xdxf.idx differ 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 0000000..bd5c857 Binary files /dev/null and b/tests/rus-eng-stardict-2.4.2/1.xdxf.idx.oft differ 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