git.iko.soy/typeable/pandoc
on master help sign in
LaTeX Reader: Test for `^^` character escapes
commit251ce0738da4ee8c74b84649f5eb86321c56b82c authorNikolay Yakimov <root@livid.pp.ru> dateMon 13 Apr 2015, 03:22 (12 years ago) parentb92d490
1 file changed+10
tests/Tests/Readers/LaTeX.hs+10
tests/Tests/Readers/LaTeX.hs+10
@@ -106,6 +106,16 @@ tests = [ testGroup "basic"
106106 [ natbibCitations
107107 , biblatexCitations
108108 ]
109+
110+ , let hex = ['0'..'9']++['a'..'f'] in
111+ testGroup "Character Escapes"
112+ [ "Two-character escapes" =:
113+ concat ["^^"++[i,j] | i <- hex, j <- hex] =?>
114+ para (str ['\0'..'\255'])
115+ , "One-character escapes" =:
116+ concat ["^^"++[i] | i <- hex] =?>
117+ para (str $ ['p'..'y']++['!'..'&'])
118+ ]
109119 ]
110120
111121baseCitation :: Citation