Skip to content

Commit

Permalink
Even more tests, fuck it…
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed Oct 17, 2017
1 parent 09b003d commit e978eb1
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion tests/Text/MMarkSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,21 @@ spec = parallel $ do
it "CM358" $
let s = "a**\"foo\"**\n"
in s ~-> [ err (posN 1 s) (utok '*' <> eeib <> eric) ]

it "CM359" $
let s = "foo**bar**\n"
in s ~-> [ err (posN 3 s) (utok '*' <> eeib <> eric) ]
it "CM360" $
"__foo bar__" ==-> "<p><strong>foo bar</strong></p>\n"
it "CM361" $
let s = "__ foo bar__\n"
in s ~-> [ errFancy (posN 1 s) (nonFlanking "_") ]
it "CM362" $
let s = "__\nfoo bar__\n"
in s ~-> [ errFancy (posN 1 s) (nonFlanking "_") ]
it "CM363" $
let s = "a__\"foo\"__\n"
in s ~-> [ err (posN 1 s) (utok '_' <> eeib <> eric) ]
-- TODO CM364-CM389
it "CM390" $
"***foo** bar*\n" ==-> "<p><em><strong>foo</strong> bar</em></p>\n"
it "CM391" $
Expand Down Expand Up @@ -689,6 +703,35 @@ spec = parallel $ do
it "CM445" $
let s = "*foo __bar *baz bim__ bam*\n"
in s ~-> [ err (posN 19 s) (utok '_' <> etok '*' <> eric) ]
it "CM446" $
let s = "**foo **bar baz**\n"
in s ~-> [ err (posN 17 s) (ueib <> etoks "**" <> elabel "inline content") ]
it "CM447" $
let s = "*foo *bar baz*\n"
in s ~-> [ err (posN 14 s) (ueib <> etok '*' <> elabel "inline content") ]
it "CM448" $
let s = "*[bar*](/url)\n"
in s ~-> [ err (posN 5 s) (utok '*' <> etok ']' <> eric) ]
it "CM449" $
let s = "_foo [bar_](/url)\n"
in s ~-> [ err (posN 9 s) (utok '_' <> etok ']' <> eric) ]
xit "CM450" $ -- FIXME pending images
"*<img src=\"foo\" title=\"*\"/>" ==->
"<p>*<img src=\"foo\" title=\"*\"/></p>\n"
xit "CM451" $ -- FIXME pending inline HTML
"**<a href=\"**\">" ==-> "<p>**<a href=\"**\"></p>\n"
xit "CM452" $
"__<a href=\"__\">\n" ==-> "<p>__<a href=\"__\"></p>\n"
it "CM453" $
"*a `*`*" ==-> "<p><em>a <code>*</code></em></p>\n"
it "CM454" $
"_a `_`_" ==-> "<p><em>a <code>_</code></em></p>\n"
xit "CM455" $ -- FIXME pending autolinks
"**a<http://foo.bar/?q=**>" ==->
"<p>**a<a href=\"http://foo.bar/?q=**\">http://foo.bar/?q=**</a></p>\n"
xit "CM456" $ -- FIXME pending autolinks
"__a<http://foo.bar/?q=__>" ==->
"<p>__a<a href=\"http://foo.bar/?q=__\">http://foo.bar/?q=__</a></p>\n"
context "6.5 Links" $ do
it "CM457" $
"[link](/uri \"title\")" ==->
Expand Down

0 comments on commit e978eb1

Please sign in to comment.