File: ipolish-test

package info (click to toggle)
ipolish 20220301-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 27,184 kB
  • sloc: sh: 78; makefile: 49
file content (28 lines) | stat: -rwxr-xr-x 636 bytes parent folder | download | duplicates (3)
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
# vim:ts=2:et:sw=2:sts=2
#
# Simple tests for ipolish source package.
#
# (C) 2021 Robert Luberda <robert@debian.org>
#

set -e

. $(readlink -e "$(dirname $0)/common.sh")

cp "$datadir/$datafile" "$tmpdir"
cd "$tmpdir"

[ $recode -eq 0 ] || recode utf-8..iso-8859-2 "$datafile"
ispell -d polish "$@" -l < "$datafile" > output.txt
[ $recode -eq 0 ] || recode iso-8859-2..utf-8 output.txt

if [ "$misspelled" -eq 1 ] ; then
  diff -u "$datadir/$datafile" output.txt || \
    die "Isell started to recognize new words"
elif [ -s output.txt ]; then
  cat output.txt
  die "Ispell no longer recognizes the above words"
fi

exit 0