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
|