#!/bin/sh
#
# Test aspell dictionary with a correct UTF-8 de_DE-1901 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

OUTPUT=$(aspell list -d de_DE < $TESTSDIR/correct.utf8.txt)

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