Debian Codegraph @

test/line-breaks

raw symbols SCIP
1 #!/bin/sh
2 . test/lib.sh
3
4 begin "Handles line break"
5 scdoc <<EOF | grep '^\.br$' >/dev/null
6 test(8)
7
8 hello++
9 world
10 EOF
11 end 0
12
13 begin "Handles line break with indentation"
14 scdoc <<EOF | grep -A1 '^\.br$' | grep '^world' >/dev/null
15 test(8)
16
17 test
18 hello++
19 world
20 EOF
21 end 0
22
23 begin "Disallows empty line after line break"
24 scdoc <<EOF >/dev/null
25 test(8)
26
27 hello++
28
29 world
30 EOF
31 end 1
32
33 begin "Leave single +"
34 scdoc <<EOF | grep 'hello+world' >/dev/null
35 test(8)
36
37 hello+world
38 EOF
39 end 0
40
41 begin "Leave double + without newline"
42 scdoc <<EOF | grep 'hello++world' >/dev/null
43 test(8)
44
45 hello++world
46 EOF
47 end 0
48
49 begin "Handles underlined text following line break"
50 scdoc <<EOF | grep '\\fIworld\\fR' >/dev/null
51 test(8)
52
53 hello++
54 _world_
55 EOF
56 end 0
57
58 begin "Suppresses sentence spacing"
59 scdoc <<EOF | grep 'hel!\\&lo.\\&' >/dev/null
60 test(8)
61
62 hel!lo.
63 world.
64 EOF
65 end 0