aboutsummaryrefslogtreecommitdiff
path: root/bbcode
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-01-12 05:30:43 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-01-12 05:30:43 +0000
commit04ddf204d1d9b44450a101fe46a4f2bf4cb55746 (patch)
tree30da080a581fcd3339b1058f031ba44592b0a372 /bbcode
parentfe17c720081798175c9936d1624f428b565e310f (diff)
downloadthermoprint-04ddf204d1d9b44450a101fe46a4f2bf4cb55746.tar
thermoprint-04ddf204d1d9b44450a101fe46a4f2bf4cb55746.tar.gz
thermoprint-04ddf204d1d9b44450a101fe46a4f2bf4cb55746.tar.bz2
thermoprint-04ddf204d1d9b44450a101fe46a4f2bf4cb55746.tar.xz
thermoprint-04ddf204d1d9b44450a101fe46a4f2bf4cb55746.zip
new tests for lexer
Diffstat (limited to 'bbcode')
-rw-r--r--bbcode/test/Text/BBCode/LexerSpec.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/bbcode/test/Text/BBCode/LexerSpec.hs b/bbcode/test/Text/BBCode/LexerSpec.hs
index bd2ab7f..9d69091 100644
--- a/bbcode/test/Text/BBCode/LexerSpec.hs
+++ b/bbcode/test/Text/BBCode/LexerSpec.hs
@@ -81,4 +81,16 @@ examples = [ ("[t]test[/t]"
81 , [BBOpen "\\t" [], BBStr "test", BBClose "t"]) 81 , [BBOpen "\\t" [], BBStr "test", BBClose "t"])
82 , ("[t]test[/t\\]]" 82 , ("[t]test[/t\\]]"
83 , [BBOpen "t" [], BBStr "test", BBClose "t]"]) 83 , [BBOpen "t" [], BBStr "test", BBClose "t]"])
84 , ("[t attr]test[/t]"
85 , [BBOpen "t" [("attr", Nothing)], BBStr "test", BBClose "t"])
86 , ("[t attr=val]test[/t]"
87 , [BBOpen "t" [("attr", Just "val")], BBStr "test", BBClose "t"])
88 , ("[t attr=\"val\"]test[/t]"
89 , [BBOpen "t" [("attr", Just "val")], BBStr "test", BBClose "t"])
90 , ("[t attr=\"va\\]l\"]test[/t]"
91 , [BBOpen "t" [("attr", Just "va]l")], BBStr "test", BBClose "t"])
92 , ("[t attr=\"va\\\"l\"]test[/t]"
93 , [BBOpen "t" [("attr", Just "va\"l")], BBStr "test", BBClose "t"])
94 , ("[t attr=\"val\" attr2=\"val2\" ]test[/t]"
95 , [BBOpen "t" [("attr", Just "val"), ("attr2", Just "val2")], BBStr "test", BBClose "t"])
84 ] 96 ]