22 Commits

Author SHA1 Message Date
Evgeniy A. Dushistov
6c80bf2d99 t_json: add data about new dictionary 2022-06-24 21:34:47 +03:00
Evgeniy A. Dushistov
8742575c33 fix bash syntax error 2022-06-24 21:34:47 +03:00
Evgeniy A. Dushistov
911fc2f561 more robust parsing of ifo file
fixes #79 fixes #81
2022-06-24 21:34:47 +03:00
Aleksa Sarai
d054adb37c tests: add multiple results integration test
Make sure we return all of the relevant results, even in cases with
lots of results (larger than ENTR_PER_PAGE in the offset index) and
where you have a synyonym and headword present for the same word.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-11-14 22:38:26 +03:00
Aleksa Sarai
51338ac5bb lookup: do not bail on first failed lookup with a word list
Due to the lack of deinflection support in StarDict, users might want to
be able to create a list of possible deinflections and search each one
to see if there is a dictionary entry for that deinflection.

Being able to do this in one sdcv invocation is far more preferable to
calling sdcv once for each candidate due to the performance cost of
doing so. The most obvious language that would benefit from this is
Japanese, but I'm sure other folks would prefer this.

In order to make this use-case better supported -- try to look up every
word in the provided list of words before existing with an error if any
one of the words failed to be looked up.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-09-29 03:28:44 +10:00
Guido Cella
3413d847c5 Comply with the XDG Base Directory Specification 2020-05-10 07:01:31 +02:00
alcah
2d1a454026 add return code test 2020-03-17 23:43:16 +10:30
Michal Čihař
0f83f0aa0b Store integer magic in cache file
This allows to detect different endianity of machines to avoid
loading caches created with different endianity.

Fixes #36

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-14 16:39:57 +01:00
Michal Čihař
69fe19d269 Use single quotes around JSON data to reduce need for escaping
Also use unicode escape sequence for newline to avoid problems with some
shells decoding \n even when they probably should not.
2017-11-08 22:51:23 +01:00
Michal Čihař
ac2acfdcd2 Pass parameters individually to the test
This way we can properly quote path.
2017-11-08 15:38:10 +01:00
Michal Čihař
4b6486c58e Fix test execution on Debian
The default /bin/sh is probably more picky than bash.

Fixes #33
2017-11-08 14:30:37 +01:00
Peter
e85927e562 Add -e for exact searches (no fuzzy matches).
Only exact matches (or synonyms) are returned for simple searches.
2017-07-28 11:39:34 +02:00
Peter
3105823e8b Add option --json-output (-j)
If given -j, format the output of -l and of searches as JSON.
2017-07-26 22:07:23 +02:00
Peter
5f0f6e036f Add option --only-data-dir (-x)
Only use the dictionaries in data-dir, do not search in user and system directories

This makes testing much easier
2017-07-07 08:39:26 +02:00
Peter
aa42132243 Add tests for synonyms 2017-07-06 19:54:36 +02:00
Evgeniy A. Dushistov
b657e810d6 fix t_utf8input on other then my machine 2016-06-02 17:09:30 +03:00
Evgeniy A. Dushistov
b8b3dc8e75 fix for t_use test 2016-06-02 15:04:23 +03:00
Evgeniy Dushistov
dd9304951f remove autotools stuff, now sdcv uses cmake 2013-07-06 18:36:42 +00:00
Evgeniy Dushistov
ab22f8eb41 replace array with variable size with vector,
this should help clang compiler to compile our source code
2013-07-06 12:52:48 +00:00
Evgeniy Dushistov
9121ccf20e Import Michal Čihař ( nijel ) patch:
Tescases fail with POSIX /bin/sh, attached patch fixes it
2010-08-01 20:42:04 +00:00
Evgeniy Dushistov
98ec160803 remove autotools crap(files produced by autotools) from repository 2007-09-30 16:20:31 +00:00
Evgeniy Dushistov
3f241bb6bb 0.4.2 release 2007-08-14 18:18:20 +00:00