@@ -54,14 +54,26 @@ tests =
5454 "=Robot.rock()=" =?>
5555 para (code "Robot.rock()")
5656
57− , "Math" =:
58− "$E=mc^2$" =?>
59− para (math "E=mc^2")
60−
6157 , "Verbatim" =:
6258 "~word for word~" =?>
6359 para (rawInline "" "word for word")
6460
61+ , "Math $..$" =:
62+ "$E=mc^2$" =?>
63+ para (math "E=mc^2")
64+
65+ , "Math $$..$$" =:
66+ "$$E=mc^2$$" =?>
67+ para (displayMath "E=mc^2")
68+
69+ , "Math \\[..\\]" =:
70+ "\\[E=ℎν\\]" =?>
71+ para (displayMath "E=ℎν")
72+
73+ , "Math \\(..\\)" =:
74+ "\\(σ_x σ_p ≥ \\frac{ℏ}{2}\\)" =?>
75+ para (math "σ_x σ_p ≥ \\frac{ℏ}{2}")
76+
6577 , "Symbol" =:
6678 "A * symbol" =?>
6779 para (str "A" <> space <> str "*" <> space <> "symbol")
@@ -86,14 +98,19 @@ tests =
8698 unlines [ "this+that+ +so+on"
8799 , "seven*eight* nine*"
88100 , "+not+funny+"
89− , "this == self"
90101 ] =?>
91102 para (spcSep [ "this+that+", "+so+on"
92103 , "seven*eight*", "nine*"
93104 , strikeout "not+funny"
94− , "this" <> space <> "==" <> space <> "self"
95105 ])
96106
107+ , "No empty markup" =:
108+ -- FIXME: __ is erroneously parsed as subscript "_"
109+ -- "// ** __ ++ == ~~ $$" =?>
110+ -- para (spcSep [ "//", "**", "__", "++", "==", "~~", "$$" ])
111+ "// ** ++ == ~~ $$" =?>
112+ para (spcSep [ "//", "**", "++", "==", "~~", "$$" ])
113+
97114 , "Adherence to Org's rules for markup borders" =:
98115 "/t/& a/ / ./r/ (*l*) /e/! /b/." =?>
99116 para (spcSep [ emph $ "t/&" <> space <> "a"
@@ -109,6 +126,13 @@ tests =
109126 para ((math "a\nb\nc") <> space <>
110127 spcSep [ "$d", "e", "f", "g$" ])
111128
129+ , "Single-character math" =:
130+ "$a$ $b$! $c$?" =?>
131+ para (spcSep [ math "a"
132+ , "$b$!"
133+ , (math "c") <> "?"
134+ ])
135+
112136 , "Markup may not span more than two lines" =:
113137 unlines [ "/this *is +totally", "nice+ not*", "emph/" ] =?>
114138 para (spcSep [ "/this"