|
. tests/functions.sh
|
|
|
|
title "smarty pants"
|
|
|
|
rc=0
|
|
MARKDOWN_FLAGS=0x0; export MARKDOWN_FLAGS
|
|
|
|
try '(c) -> ©' '(c)' '<p>©</p>'
|
|
try '(r) -> ®' '(r)' '<p>®</p>'
|
|
try '(tm) -> ™' '(tm)' '<p>™</p>'
|
|
try '... -> …' '...' '<p>…</p>'
|
|
|
|
try '"?--" -> –' '?--' '<p>?–</p>'
|
|
try '"?---" -> —' '?---' '<p>?—</p>'
|
|
|
|
try '"--" -> –' 'regular --' '<p>regular –</p>'
|
|
try 'A-B -> A-B' 'A-B' '<p>A-B</p>'
|
|
try '"fancy" -> “fancy”' '"fancy"' '<p>“fancy”</p>'
|
|
try "'fancy'" "'fancy'" '<p>‘fancy’</p>'
|
|
try "don<b>'t -> don<b>’t" "don<b>'t" '<p>don<b>’t</p>'
|
|
try "don't -> don’t" "don't" '<p>don’t</p>'
|
|
try "it's -> it’s" "it's" '<p>it’s</p>'
|
|
|
|
summary $0
|
|
exit $rc
|