@@ -54,14 +54,26 @@ tests =
54 "=Robot.rock()=" =?>
54 "=Robot.rock()=" =?>
55 para (code "Robot.rock()")
55 para (code "Robot.rock()")
61 , "Verbatim" =:
57 , "Verbatim" =:
62 "~word for word~" =?>
58 "~word for word~" =?>
63 para (rawInline "" "word for word")
59 para (rawInline "" "word for word")
67+ para (displayMath "E=mc^2")
71+ para (displayMath "E=ℎν")
74+ "\\(σ_x σ_p ≥ \\frac{ℏ}{2}\\)" =?>
75+ para (math "σ_x σ_p ≥ \\frac{ℏ}{2}")
65 , "Symbol" =:
77 , "Symbol" =:
66 "A * symbol" =?>
78 "A * symbol" =?>
67 para (str "A" <> space <> str "*" <> space <> "symbol")
79 para (str "A" <> space <> str "*" <> space <> "symbol")
@@ -86,14 +98,19 @@ tests =
86 unlines [ "this+that+ +so+on"
98 unlines [ "this+that+ +so+on"
87 , "seven*eight* nine*"
99 , "seven*eight* nine*"
88 , "+not+funny+"
100 , "+not+funny+"
91 para (spcSep [ "this+that+", "+so+on"
102 para (spcSep [ "this+that+", "+so+on"
92 , "seven*eight*", "nine*"
103 , "seven*eight*", "nine*"
93 , strikeout "not+funny"
104 , strikeout "not+funny"
94− , "this" <> space <> "==" <> space <> "self"
107+ , "No empty markup" =:
108+ -- FIXME: __ is erroneously parsed as subscript "_"
109+ -- "// ** __ ++ == ~~ $$" =?>
110+ -- para (spcSep [ "//", "**", "__", "++", "==", "~~", "$$" ])
111+ "// ** ++ == ~~ $$" =?>
112+ para (spcSep [ "//", "**", "++", "==", "~~", "$$" ])
97 , "Adherence to Org's rules for markup borders" =:
114 , "Adherence to Org's rules for markup borders" =:
98 "/t/& a/ / ./r/ (*l*) /e/! /b/." =?>
115 "/t/& a/ / ./r/ (*l*) /e/! /b/." =?>
99 para (spcSep [ emph $ "t/&" <> space <> "a"
116 para (spcSep [ emph $ "t/&" <> space <> "a"
@@ -109,6 +126,13 @@ tests =
109 para ((math "a\nb\nc") <> space <>
126 para ((math "a\nb\nc") <> space <>
110 spcSep [ "$d", "e", "f", "g$" ])
127 spcSep [ "$d", "e", "f", "g$" ])
129+ , "Single-character math" =:
131+ para (spcSep [ math "a"
112 , "Markup may not span more than two lines" =:
136 , "Markup may not span more than two lines" =:
113 unlines [ "/this *is +totally", "nice+ not*", "emph/" ] =?>
137 unlines [ "/this *is +totally", "nice+ not*", "emph/" ] =?>
114 para (spcSep [ "/this"
138 para (spcSep [ "/this"