You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scdoc/test/inline-formatting

35 lines
465 B

#!/bin/sh
. test/lib.sh
begin "Disallows nested formatting"
scdoc <<EOF >/dev/null
test(8)
_hello *world*_
EOF
end 1
begin "Emits bold text"
scdoc <<EOF | grep '^hello \\fBworld\\fR' >/dev/null
test(8)
hello *world*
EOF
end 0
begin "Emits underlined text"
scdoc <<EOF | grep '^hello \\fIworld\\fR' >/dev/null
test(8)
hello _world_
EOF
end 0
begin "Handles escaped characters"
scdoc <<EOF | grep '^hello _world_' >/dev/null
test(8)
hello \_world\_
EOF
end 0