Debian Codegraph @

t/hash-count

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 # Check that we don't get debug symbols [#@] on some test texts.
4
5 set -e -u
6
7 cd "$(dirnamescip-shell system . . dirname. "$0")"
8
9
10 out=$(mktempscip-shell system . . 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 catscip-shell system . . cat. ../texts/*."${src}".txt | apertium -f html-noent -d .. "${dir}"-dgen > "${out}"
17
18 current=$(grepscip-shell system . . grep. -c '[#@]' "${out}" || truescip-shell system . . true.)
19
20 if [[ "${current}" -gt 0 ]]; then
21 echoscip-shell system . . echo. "ERROR: texts/*.${src}.txt translated through ${dir} gave debug sybols [#@]:"
22 grepscip-shell system . . grep. -n '[#@]' "${out}"
23 exit 1
24 fi
25 done