mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-16 01:41:55 +00:00
Add tests for synonyms
This commit is contained in:
22
tests/t_synonyms
Executable file
22
tests/t_synonyms
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
SDCV="$1"
|
||||
TEST_DIR="$2"
|
||||
|
||||
unset SDCV_PAGER
|
||||
test_word() {
|
||||
WORD=$1
|
||||
RES=$($SDCV -n --data-dir "$TEST_DIR" -u "Test synonyms" $WORD | grep result)
|
||||
if [ "result of test" != "$RES" ]; then
|
||||
echo "synonym for $WORD should be 'result of test' but was '$RES'"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
test_word foo
|
||||
test_word bar
|
||||
test_word test
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user