File: t_only_data_dir

package info (click to toggle)
sdcv 0.5.5-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 596 kB
  • sloc: cpp: 3,082; sh: 226; xml: 23; makefile: 10
file content (19 lines) | stat: -rwxr-xr-x 394 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

set -e

SDCV="$1"
TEST_DIR="$2"

unset SDCV_PAGER
unset STARDICT_DATA_DIR

DICTS=$($SDCV -x -n -l --data-dir "$TEST_DIR" | tail -n +2 | wc -l)
# the expected result:
ACTUAL_DICTS=$(find "$TEST_DIR" -name "*.ifo" | wc -l)
if [ $DICTS -ne $ACTUAL_DICTS ]; then
   echo "number of dictionaries in $TEST_DIR should be $ACTUAL_DICTS but was $DICTS according to sdcv"
   exit 1
fi

exit 0