File: t_use

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 (20 lines) | stat: -rwxr-xr-x 508 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e

PATH_TO_SDCV="$1"
TESTS_DIR="$2"

mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic
cp -R "${TESTS_DIR}/stardict-test_dict-2.4.2" "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic
unset SDCV_PAGER
RES=`"$PATH_TO_SDCV" -n -u test_dict test | grep "test passed"`

if [ -z "$RES" ]; then
	echo "we didn't find in stardict-test_dict-2.4.2 "test" keyword, something wrong" >&2
	exit 1
fi

rm -fr "${XDG_DATA_HOME:-$HOME/.local/share}"/stardict/dic/stardict-test_dict-2.4.2

exit 0