Lindenii Project Forge
Login

scdoc

scdoc mirror for performance testing
Commit info
ID
1ff92630d617ab17919ed926d971f2046e5dc288
Author
Michael Weiss <dev.primeos@gmail.com>
Author date
Sun, 03 Mar 2019 11:11:27 +0100
Committer
Drew DeVault <sir@cmpwn.com>
Committer date
Sun, 03 Mar 2019 09:07:54 -0700
Actions
Fix the "Ignores underscores in underlined words" test

The test produced the following output:
Ignores underscores in underlined words test/inline-formatting: line 26: end0: not found
#!/bin/sh
. test/lib.sh

begin "Disallows nested formatting"
scdoc <<EOF >/dev/null
test(8)

_hello *world*_
EOF
end 1

begin "Ignores underscores in words"
scdoc <<EOF | grep -v 'fR' >/dev/null
test(8)

hello_world
EOF
end 0

begin "Ignores underscores in underlined words"
scdoc <<EOF | grep '\\fIhello_world\\fR' >/dev/null
test(8)

_hello_world_
EOF
end0
end 0

begin "Ignores underscores in bolded words"
scdoc <<EOF | grep '^\\fBhello_world\\fR' >/dev/null
test(8)

*hello_world*
EOF
end 0

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