File: ispell-ok

package info (click to toggle)
igerman98 20161207-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,260 kB
  • sloc: perl: 926; makefile: 472; sh: 437; sed: 32
file content (28 lines) | stat: -rwxr-xr-x 604 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#
# Test with a correct ISO-8859-1 (Latin1) German text.
#
# (c) 2018 Roland Rosenfeld <roland@debian.org>

TESTSDIR=$(dirname $0)

if [ -z "$AUTOPKGTEST_TMP" ]; then
    AUTOPKGTEST_TMP=$(mktemp -d)
fi

trap "rm -rf $AUTOPKGTEST_TMP" EXIT

iconv -f UTF-8 -t ISO-8859-1 < $TESTSDIR/correct.utf8.txt \
                             > $AUTOPKGTEST_TMP/correct.latin1.txt

OUTPUT=$(ispell -l -w '' -Tlatin1 -C -d ngerman \
		< $AUTOPKGTEST_TMP/correct.latin1.txt)

if [ -z "$OUTPUT" ]
then
    exit 0
else
    echo "ispell did not accept the following words:"
    echo $OUTPUT
    exit 1
fi