File: heading

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 (34 lines) | stat: -rwxr-xr-x 423 bytes parent folder | download | duplicates (5)
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
#!/bin/sh
. test/lib.sh

begin "Fail on ###"
scdoc <<EOF >/dev/null
test(8)

### this is not a valid heading
EOF
end 1

begin "Expects a space after #"
scdoc <<EOF >/dev/null
test(8)

#needs a space there
EOF
end 1

begin "Emits a new section"
scdoc <<EOF | grep '^\.SH HEADER' >/dev/null
test(8)

# HEADER
EOF
end 0

begin "Emits a new subsection"
scdoc <<EOF | grep '^\.SS HEADER' >/dev/null
test(8)

## HEADER
EOF
end 0