File: line-breaks

package info (click to toggle)
scdoc 1.11.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 212 kB
  • sloc: ansic: 1,043; sh: 340; makefile: 58
file content (65 lines) | stat: -rwxr-xr-x 840 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
. test/lib.sh

begin "Handles line break"
scdoc <<EOF | grep '^\.br$' >/dev/null
test(8)

hello++
world
EOF
end 0

begin "Handles line break with indentation"
scdoc <<EOF | grep -A1 '^\.br$' | grep '^world' >/dev/null
test(8)

test
	hello++
	world
EOF
end 0

begin "Disallows empty line after line break"
scdoc <<EOF >/dev/null
test(8)

hello++

world
EOF
end 1

begin "Leave single +"
scdoc <<EOF | grep 'hello+world' >/dev/null
test(8)

hello+world
EOF
end 0

begin "Leave double + without newline"
scdoc <<EOF | grep 'hello++world' >/dev/null
test(8)

hello++world
EOF
end 0

begin "Handles underlined text following line break"
scdoc <<EOF | grep '\\fIworld\\fR' >/dev/null
test(8)

hello++
_world_
EOF
end 0

begin "Suppresses sentence spacing"
scdoc <<EOF | grep 'hel!\\&lo.\\&' >/dev/null
test(8)

hel!lo.
world.
EOF
end 0