Debian Codegraph @

importers/ding2tei/testsuite/test-ding.sed

raw
1 #!/usr/bin/env -S sed -nEf
2 #
3 # test-ding.sed - validate the Ding input to a certain degree
4 #
5 # Copyright 2020 Einhard Leichtfuß
6 #
7 # This file is part of ding2tei-haskell.
8 #
9 # ding2tei-haskell is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU Affero General Public License as published
11 # by the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # ding2tei-haskell is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU Affero General Public License for more details.
18 #
19 # You should have received a copy of the GNU Affero General Public License
20 # along with ding2tei-haskell. If not, see <https://www.gnu.org/licenses/>.
21 #
22
23 # Note: This may give incorrect guesses when stumbling upon "/ | /".
24 # - which is not present in Ding v1.8.1.
25
26 h
27
28 # Check for different count of <|> around <::>.
29 s/[^:|]//g
30 s/::/_/
31 s/://g
32 /_/ {
33 /^(\|*)_\1/ ! {
34 g
35 s/^.*$/Unbalanced <\|> separators:\n&\n/
36 p
37 }
38 }
39
40 #g -- add before next test
41
42 # vi: noet