mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-16 01:41:55 +00:00
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>
This commit is contained in:
committed by
Evgeniy Dushistov
parent
4a9b1dae3d
commit
d054adb37c
@@ -18,7 +18,10 @@ test_json() {
|
||||
fi
|
||||
}
|
||||
|
||||
test_json '[{"name": "Test synonyms", "wordcount": "2"},{"name": "Sample 1 test dictionary", "wordcount": "1"},{"name": "test_dict", "wordcount": "1"}]' -x -j -l -n --data-dir "$TEST_DIR"
|
||||
test_json '[{"name": "Test synonyms", "wordcount": "2"},
|
||||
{"name": "Test multiple results", "wordcount": "246"},
|
||||
{"name": "Sample 1 test dictionary", "wordcount": "1"},
|
||||
{"name": "test_dict", "wordcount": "1"}]' -x -j -l -n --data-dir "$TEST_DIR"
|
||||
test_json '[{"dict": "Test synonyms","word":"test","definition":"\u000aresult of test"}]' -x -j -n --data-dir "$TEST_DIR" foo
|
||||
test_json '[]' -x -j -n --data-dir "$TEST_DIR" foobarbaaz
|
||||
|
||||
|
||||
Reference in New Issue
Block a user