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-swe-nor.XXXXXXXXXX)
11 trap 'rm -f "${out}"' EXIT
12
13 # TODO: regressions:
14 # swe-nno nob-swe
15 for dir in swe-nob nno-swe; do
16 src=${dir%%-*}
17
18 # cat ../texts/*."${src}".txt | apertium -f html-noent -d .. "${dir}"-dgen > "${out}"
19 # TODO: -f html-noent does rehtml or something turning dgen tags into <>
20 catscip-shell system . . cat. ../texts/*."${src}".txt | apertium-deshtml | apertium -f none -d .. "${dir}"-dgen > "${out}"
21
22 current=$(grepscip-shell system . . grep. -c '[#@]' "${out}" || truescip-shell system . . true.)
23
24 if [[ "${current}" -gt 0 ]]; then
25 echoscip-shell system . . echo. "ERROR: texts/*.${src}.txt translated through ${dir} gave debug sybols [#@]:"
26 grepscip-shell system . . grep. -n '[#@]' "${out}"
27 exit 1
28 fi
29 done