From 5894bf2affa3bb7cada6d5aaec7c6b43283a8c73 Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Thu, 25 Sep 2014 23:09:49 +0400 Subject: Add generated parser, lexer and some tests. --- test/src/markdown/ParserTest.kt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'test/src/markdown/ParserTest.kt') diff --git a/test/src/markdown/ParserTest.kt b/test/src/markdown/ParserTest.kt index b4538b07..7b1522bc 100644 --- a/test/src/markdown/ParserTest.kt +++ b/test/src/markdown/ParserTest.kt @@ -14,6 +14,16 @@ public class ParserTest { println(markdown.dump()) } + Test fun link() { + val markdown = MarkdownProcessor().parse("text [links]") + println(markdown.dump()) + } + + Test fun linkWithHref() { + val markdown = MarkdownProcessor().parse("text [links](http://destination)") + println(markdown.dump()) + } + Test fun multiline() { val markdown = MarkdownProcessor().parse( """ @@ -44,6 +54,28 @@ number two println(markdown.dump()) } + Test fun bulletListWithLines() { + val markdown = MarkdownProcessor().parse( +""" +* list item 1 + continue 1 +* list item 2 + continue 2 + """) + println(markdown.dump()) + } + + Test fun bulletListStrong() { + val markdown = MarkdownProcessor().parse( +""" +* list *item* 1 + continue 1 +* list *item* 2 + continue 2 + """) + println(markdown.dump()) + } + Test fun emph() { val markdown = MarkdownProcessor().parse("*text*") println(markdown.dump()) -- cgit