use warnings; use strict; use Test::More 'no_plan'; use lib ('lib', '../lib'); use MKDoc::Text::Structured; my $text = undef; $text = MKDoc::Text::Structured::process ("'let's see if simple '' smart quotes work'"); is ($text, "
‘let's see if simple '' smart quotes work’
"); $text = MKDoc::Text::Structured::process ("'' ''' '' ''''"); is ($text, "'' ''' '' ''''
"); $text = MKDoc::Text::Structured::process ('"let"s see if simple "" smart quotes work"'); is ($text, '“let"s see if simple "" smart quotes work”
'); $text = MKDoc::Text::Structured::process ('"" """ "" """"'); is ($text, '"" """ "" """"
'); $text = MKDoc::Text::Structured::process ('"“<QUOT>”
'); $text = MKDoc::Text::Structured::process ("This is a test: http://www.google.com/"); is ($text, 'This is a test: http://www.google.com/
'); $text = MKDoc::Text::Structured::process ("this is cool -- because it should be an em-dash -- and I like it."); is ($text, 'this is cool — because it should be an em-dash — and I like it.
'); $text = MKDoc::Text::Structured::process ("this is cool-- because it should be an em-dash --and I like it."); unlike ($text, qr/\&/); $text = MKDoc::Text::Structured::process ("this is cool - because it should be an en-dash - and I like it."); is ($text, 'this is cool – because it should be an en-dash – and I like it.
'); $text = MKDoc::Text::Structured::process ("this is cool- because it should be an en-dash -and I like it."); unlike ($text, qr/\&/); $text = MKDoc::Text::Structured::process ("I wonder if this works..."); is ($text, 'I wonder if this works…
'); $text = MKDoc::Text::Structured::process ("... (...) ... .... .."); is ($text, '… (…) … .... ..
'); $text = MKDoc::Text::Structured::process ("ACLU(American Civil Liberties Union)"); is ($text, 'ACLU
'); $text = MKDoc::Text::Structured::process ('FART(Fat Australian "Red Tigers)'); is ($text, 'FART
'); $text = MKDoc::Text::Structured::process ('FART(Fat Australian "Red" Tigers)'); is ($text, 'FART
'); $text = MKDoc::Text::Structured::process ('FART(Fat Australian &<>Red Tigers)'); is ($text, 'FART
'); $text = MKDoc::Text::Structured::process ("ACLU (American Civil Liberties Union)"); is ($text, 'ACLU (American Civil Liberties Union)
'); $text = MKDoc::Text::Structured::process ("(tm), (r), (c)! Roxor 10x2"); is ($text, '™, ®, ©! Roxor 10×2
'); $text = MKDoc::Text::Structured::process ("The RSS(RDF Site Summary) is the BBC(British Broadcasting Corporation)."); like ($text, qr#The RSS#); like ($text, qr#BBC#); $text = MKDoc::Text::Structured::process ("BBC(British Broadcasting Corporation)."); like ($text, qr#BBC#); $text = MKDoc::Text::Structured::process (qq|'I' am 'here'|); like ($text, qr#‘I’#); like ($text, qr#‘here’#); $text = MKDoc::Text::Structured::process (qq|"I" am "here"|); like ($text, qr#“I”#); like ($text, qr#“here”#); __END__