Debian Codegraph @

t/hash-count

raw symbols SCIP
1 #!/bin/bash
2
3 # Check that we don't get debug symbols [#@] on some test texts.
4
5 set -e -u
6
7 cd "$(dirname "$0")"
8
9
10 out=$(mktemp -t hash-count-dan-nor.XXXXXXXXXX)
11 trap 'rm -f "${out}"' EXIT
12
13 for dir in dan-nob dan-nno nob-dan; do
14 src=${dir%%-*}
15
16 cat ../texts/*."${src}".txt | apertium -f html-noent -d .. "${dir}"-dgen > "${out}"
17
18 current=$(grep -c '[#@]' "${out}" || true)
19
20 if [[ "${current}" -gt 0 ]]; then
21 echo "ERROR: texts/*.${src}.txt translated through ${dir} gave debug sybols [#@]:"
22 grep -n '[#@]' "${out}"
23 exit 1
24 fi
25 done