Warning, /education/cantor/thirdparty/discount-2.2.6-patched/tests/autolink.t is written in an unsupported language. File is not indexed.

0001 . tests/functions.sh
0002 
0003 title 'Reddit-style automatic links'
0004 rc=0
0005 
0006 try -fautolink 'single link' \
0007     'http://www.pell.portland.or.us/~orc/Code/discount' \
0008     '<p><a href="http://www.pell.portland.or.us/~orc/Code/discount">http://www.pell.portland.or.us/~orc/Code/discount</a></p>'
0009 
0010 try -fautolink '[!](http://a.com "http://b.com")' \
0011     '[!](http://a.com "http://b.com")' \
0012     '<p><a href="http://a.com" title="http://b.com">!</a></p>'
0013 
0014 try -fautolink 'link surrounded by text' \
0015     'here http://it is?' \
0016     '<p>here <a href="http://it">http://it</a> is?</p>'
0017 
0018 try -fautolink 'naked @' '@' '<p>@</p>'
0019 
0020 try -fautolink 'parenthesised (url)' \
0021     '(http://here)' \
0022     '<p>(<a href="http://here">http://here</a>)</p>'
0023 
0024 try -fautolink 'token with trailing @' 'orc@' '<p>orc@</p>'
0025 
0026 summary $0
0027 exit $rc