File: automatic.t

package info (click to toggle)
discount 2.1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 728 kB
  • sloc: ansic: 4,582; pascal: 855; sh: 196; makefile: 120
file content (27 lines) | stat: -rw-r--r-- 1,213 bytes parent folder | download | duplicates (15)
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
. tests/functions.sh

title "automatic links"

rc=0
MARKDOWN_FLAGS=

try 'http url' '<http://here>' '<p><a href="http://here">http://here</a></p>'
try 'ftp url' '<ftp://here>' '<p><a href="ftp://here">ftp://here</a></p>'
try 'http://foo/bar' '<http://foo/bar>' '<p><a href="http://foo/bar">http://foo/bar</a></p>'
try 'http:/foo/bar'  '<http:/foo/bar>'  '<p><a href="http:/foo/bar">http:/foo/bar</a></p>'
try 'http:foo/bar'   '<http:foo/bar>'   '<p><a href="http:foo/bar">http:foo/bar</a></p>'
try '</foo/bar>'     '</foo/bar>'       '<p></foo/bar></p>'
match '<orc@pell.portland.or.us>' '<orc@pell.portland.or.us>' '<a href='
match '<orc@pell.com.>' '<orc@pell.com.>' '<a href='
try 'invalid <orc@>' '<orc@>' '<p>&lt;orc@></p>'
try 'invalid <@pell>' '<@pell>' '<p>&lt;@pell></p>'
try 'invalid <orc@pell>' '<orc@pell>' '<p>&lt;orc@pell></p>'
try 'invalid <orc@.pell>' '<orc@.pell>' '<p>&lt;orc@.pell></p>'
try 'invalid <orc@pell.>' '<orc@pell.>' '<p>&lt;orc@pell.></p>'
match '<mailto:orc@pell>' '<mailto:orc@pell>' '<a href='
match '<mailto:orc@pell.com>' '<mailto:orc@pell.com>' '<a href='
match '<mailto:orc@>' '<mailto:orc@>' '<a href='
match '<mailto:@pell>' '<mailto:@pell>' '<a href='

summary $0
exit $rc