From 1245712ef6e8ccfee3040d369aa0670a80333ba6 Mon Sep 17 00:00:00 2001 From: Dimitry Ivanov Date: Mon, 17 Dec 2018 17:10:58 +0300 Subject: [PATCH] Migrating tests to new format --- .../markwon/core/suite/BaseSuiteTest.java | 16 +-- .../markwon/core/suite/BlockquoteTest.java | 48 ++++++++ .../{BoldItalic.java => BoldItalicTest.java} | 2 +- .../suite/{CodeBlocks.java => CodeTest.java} | 28 ++++- ...eeplyNested.java => DeeplyNestedTest.java} | 2 +- .../core/suite/{First.java => FirstTest.java} | 2 +- .../markwon/core/suite/NoParagraphsTest.java | 33 ++++++ .../markwon/core/suite/OrderedListTest.java | 108 ++++++++++++++++++ .../markwon/core/suite/ParagraphTest.java | 43 +++++++ .../noties/markwon/core/suite/SecondTest.java | 63 ++++++++++ .../markwon/core/suite/TestFactory.java | 20 +++- .../resources/tests/nested-blockquotes.md | 3 + .../resources/tests/nested-blockquotes.yaml | 12 -- .../src/test/resources/tests/no-paragraphs.md | 3 + .../test/resources/tests/no-paragraphs.yaml | 12 -- .../src/test/resources/tests/ol-2-spaces.md | 3 + .../src/test/resources/tests/ol-2-spaces.yaml | 16 --- .../test/resources/tests/ol-starts-with-5.md | 3 + .../resources/tests/ol-starts-with-5.yaml | 14 --- markwon/src/test/resources/tests/ol.md | 3 + markwon/src/test/resources/tests/ol.yaml | 14 --- markwon/src/test/resources/tests/paragraph.md | 3 + .../src/test/resources/tests/paragraph.yaml | 12 -- markwon/src/test/resources/tests/second.md | 12 ++ markwon/src/test/resources/tests/second.yaml | 29 ----- .../test/resources/tests/single-blockquote.md | 1 + .../resources/tests/single-blockquote.yaml | 4 - .../test/resources/tests/single-code-block.md | 3 + .../resources/tests/single-code-block.yaml | 7 -- .../src/test/resources/tests/single-code.md | 1 + .../src/test/resources/tests/single-code.yaml | 4 - markwon/src/test/resources/tests/single-ol.md | 1 + .../src/test/resources/tests/single-ol.yaml | 5 - 33 files changed, 382 insertions(+), 148 deletions(-) create mode 100644 markwon/src/test/java/ru/noties/markwon/core/suite/BlockquoteTest.java rename markwon/src/test/java/ru/noties/markwon/core/suite/{BoldItalic.java => BoldItalicTest.java} (93%) rename markwon/src/test/java/ru/noties/markwon/core/suite/{CodeBlocks.java => CodeTest.java} (64%) rename markwon/src/test/java/ru/noties/markwon/core/suite/{DeeplyNested.java => DeeplyNestedTest.java} (95%) rename markwon/src/test/java/ru/noties/markwon/core/suite/{First.java => FirstTest.java} (96%) create mode 100644 markwon/src/test/java/ru/noties/markwon/core/suite/NoParagraphsTest.java create mode 100644 markwon/src/test/java/ru/noties/markwon/core/suite/OrderedListTest.java create mode 100644 markwon/src/test/java/ru/noties/markwon/core/suite/ParagraphTest.java create mode 100644 markwon/src/test/java/ru/noties/markwon/core/suite/SecondTest.java create mode 100644 markwon/src/test/resources/tests/nested-blockquotes.md delete mode 100644 markwon/src/test/resources/tests/nested-blockquotes.yaml create mode 100644 markwon/src/test/resources/tests/no-paragraphs.md delete mode 100644 markwon/src/test/resources/tests/no-paragraphs.yaml create mode 100644 markwon/src/test/resources/tests/ol-2-spaces.md delete mode 100644 markwon/src/test/resources/tests/ol-2-spaces.yaml create mode 100644 markwon/src/test/resources/tests/ol-starts-with-5.md delete mode 100644 markwon/src/test/resources/tests/ol-starts-with-5.yaml create mode 100644 markwon/src/test/resources/tests/ol.md delete mode 100644 markwon/src/test/resources/tests/ol.yaml create mode 100644 markwon/src/test/resources/tests/paragraph.md delete mode 100644 markwon/src/test/resources/tests/paragraph.yaml create mode 100644 markwon/src/test/resources/tests/second.md delete mode 100644 markwon/src/test/resources/tests/second.yaml create mode 100644 markwon/src/test/resources/tests/single-blockquote.md delete mode 100644 markwon/src/test/resources/tests/single-blockquote.yaml create mode 100644 markwon/src/test/resources/tests/single-code-block.md delete mode 100644 markwon/src/test/resources/tests/single-code-block.yaml create mode 100644 markwon/src/test/resources/tests/single-code.md delete mode 100644 markwon/src/test/resources/tests/single-code.yaml create mode 100644 markwon/src/test/resources/tests/single-ol.md delete mode 100644 markwon/src/test/resources/tests/single-ol.yaml diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/BaseSuiteTest.java b/markwon/src/test/java/ru/noties/markwon/core/suite/BaseSuiteTest.java index 6fec8d8d..f2604a67 100644 --- a/markwon/src/test/java/ru/noties/markwon/core/suite/BaseSuiteTest.java +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/BaseSuiteTest.java @@ -15,17 +15,13 @@ import ru.noties.markwon.test.TestUtil; abstract class BaseSuiteTest { - void matches(@NonNull String input, @NonNull TestSpan.Document document) { - final Spanned spanned = (Spanned) markwon().toMarkdown(input); + void matchInput(@NonNull String name, @NonNull TestSpan.Document document) { + final Spanned spanned = markwon().toMarkdown(read(name)); TestSpanMatcher.matches(spanned, document); } - void matchInput(@NonNull String name, @NonNull TestSpan.Document document) { - matches(read(name), document); - } - @NonNull - String read(@NonNull String name) { + private String read(@NonNull String name) { return TestUtil.read(this, "tests/" + name); } @@ -36,9 +32,13 @@ abstract class BaseSuiteTest { .use(new AbstractMarkwonPlugin() { @Override public void configureConfiguration(@NonNull MarkwonConfiguration.Builder builder) { - builder.factory(new TestFactory()); + builder.factory(new TestFactory(useParagraphs())); } }) .build(); } + + boolean useParagraphs() { + return false; + } } diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/BlockquoteTest.java b/markwon/src/test/java/ru/noties/markwon/core/suite/BlockquoteTest.java new file mode 100644 index 00000000..d5d0a8cb --- /dev/null +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/BlockquoteTest.java @@ -0,0 +1,48 @@ +package ru.noties.markwon.core.suite; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.annotation.Config; + +import ru.noties.markwon.test.TestSpan.Document; + +import static ru.noties.markwon.core.suite.TestFactory.BLOCK_QUOTE; +import static ru.noties.markwon.test.TestSpan.document; +import static ru.noties.markwon.test.TestSpan.span; +import static ru.noties.markwon.test.TestSpan.text; + +@RunWith(RobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class BlockquoteTest extends BaseSuiteTest { + + /* + > First + > > Second + > > > Third + */ + + @Test + public void nested() { + + final Document document = document( + span(BLOCK_QUOTE, + text("First\n\n"), + span(BLOCK_QUOTE, + text("Second\n\n"), + span(BLOCK_QUOTE, + text("Third")))) + ); + + matchInput("nested-blockquotes.md", document); + } + + @Test + public void single() { + + final Document document = document( + span(BLOCK_QUOTE, text("blockquote"))); + + matchInput("single-blockquote.md", document); + } +} diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/BoldItalic.java b/markwon/src/test/java/ru/noties/markwon/core/suite/BoldItalicTest.java similarity index 93% rename from markwon/src/test/java/ru/noties/markwon/core/suite/BoldItalic.java rename to markwon/src/test/java/ru/noties/markwon/core/suite/BoldItalicTest.java index c0ad4bd1..0fa65ddd 100644 --- a/markwon/src/test/java/ru/noties/markwon/core/suite/BoldItalic.java +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/BoldItalicTest.java @@ -15,7 +15,7 @@ import static ru.noties.markwon.test.TestSpan.text; @RunWith(RobolectricTestRunner.class) @Config(manifest = Config.NONE) -public class BoldItalic extends BaseSuiteTest { +public class BoldItalicTest extends BaseSuiteTest { /* **_bold italic_** diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/CodeBlocks.java b/markwon/src/test/java/ru/noties/markwon/core/suite/CodeTest.java similarity index 64% rename from markwon/src/test/java/ru/noties/markwon/core/suite/CodeBlocks.java rename to markwon/src/test/java/ru/noties/markwon/core/suite/CodeTest.java index 6427f0ec..1331b7b8 100644 --- a/markwon/src/test/java/ru/noties/markwon/core/suite/CodeBlocks.java +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/CodeTest.java @@ -5,7 +5,7 @@ import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.annotation.Config; -import ru.noties.markwon.test.TestSpan; +import ru.noties.markwon.test.TestSpan.Document; import static ru.noties.markwon.core.suite.TestFactory.CODE; import static ru.noties.markwon.test.TestSpan.args; @@ -15,7 +15,7 @@ import static ru.noties.markwon.test.TestSpan.text; @RunWith(RobolectricTestRunner.class) @Config(manifest = Config.NONE) -public class CodeBlocks extends BaseSuiteTest { +public class CodeTest extends BaseSuiteTest { /* ```java @@ -30,9 +30,9 @@ public class CodeBlocks extends BaseSuiteTest { */ @Test - public void test() { + public void multiple_blocks() { - final TestSpan.Document document = document( + final Document document = document( span(CODE, args("multiline", true), text("\u00a0\nfinal String s = null;\n\u00a0")), @@ -48,4 +48,24 @@ public class CodeBlocks extends BaseSuiteTest { matchInput("code-blocks.md", document); } + + @Test + public void single() { + + final Document document = document( + span(CODE, args("multiline", false), text("\u00a0code\u00a0")) + ); + + matchInput("single-code.md", document); + } + + @Test + public void single_block() { + + final Document document = document( + span(CODE, args("multiline", true), text("\u00a0\ncode block\n\u00a0")) + ); + + matchInput("single-code-block.md", document); + } } diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/DeeplyNested.java b/markwon/src/test/java/ru/noties/markwon/core/suite/DeeplyNestedTest.java similarity index 95% rename from markwon/src/test/java/ru/noties/markwon/core/suite/DeeplyNested.java rename to markwon/src/test/java/ru/noties/markwon/core/suite/DeeplyNestedTest.java index 16e5b2e6..49606f90 100644 --- a/markwon/src/test/java/ru/noties/markwon/core/suite/DeeplyNested.java +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/DeeplyNestedTest.java @@ -17,7 +17,7 @@ import static ru.noties.markwon.test.TestSpan.text; @RunWith(RobolectricTestRunner.class) @Config(manifest = Config.NONE) -public class DeeplyNested extends BaseSuiteTest { +public class DeeplyNestedTest extends BaseSuiteTest { /* **bold *bold italic `bold italic code` bold italic* bold** normal diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/First.java b/markwon/src/test/java/ru/noties/markwon/core/suite/FirstTest.java similarity index 96% rename from markwon/src/test/java/ru/noties/markwon/core/suite/First.java rename to markwon/src/test/java/ru/noties/markwon/core/suite/FirstTest.java index 9aaf05ed..340b5fe9 100644 --- a/markwon/src/test/java/ru/noties/markwon/core/suite/First.java +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/FirstTest.java @@ -17,7 +17,7 @@ import static ru.noties.markwon.test.TestSpan.text; @RunWith(RobolectricTestRunner.class) @Config(manifest = Config.NONE) -public class First extends BaseSuiteTest { +public class FirstTest extends BaseSuiteTest { /* Here is some [link](https://my.href) diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/NoParagraphsTest.java b/markwon/src/test/java/ru/noties/markwon/core/suite/NoParagraphsTest.java new file mode 100644 index 00000000..32ea306b --- /dev/null +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/NoParagraphsTest.java @@ -0,0 +1,33 @@ +package ru.noties.markwon.core.suite; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.annotation.Config; + +import ru.noties.markwon.test.TestSpan.Document; + +import static ru.noties.markwon.test.TestSpan.document; +import static ru.noties.markwon.test.TestSpan.text; + +@RunWith(RobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class NoParagraphsTest extends BaseSuiteTest { + /* + This could be a paragraph + + But it is not and this one is not also + */ + + @Test + public void test() { + + final Document document = document( + text("This could be a paragraph"), + text("\n\n"), + text("But it is not and this one is not also") + ); + + matchInput("no-paragraphs.md", document); + } +} diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/OrderedListTest.java b/markwon/src/test/java/ru/noties/markwon/core/suite/OrderedListTest.java new file mode 100644 index 00000000..9a674b3f --- /dev/null +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/OrderedListTest.java @@ -0,0 +1,108 @@ +package ru.noties.markwon.core.suite; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.annotation.Config; + +import ru.noties.markwon.test.TestSpan.Document; + +import static ru.noties.markwon.core.suite.TestFactory.ORDERED_LIST; +import static ru.noties.markwon.test.TestSpan.args; +import static ru.noties.markwon.test.TestSpan.document; +import static ru.noties.markwon.test.TestSpan.span; +import static ru.noties.markwon.test.TestSpan.text; + +@RunWith(RobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class OrderedListTest extends BaseSuiteTest { + + /* + 1. First + 1. Second + 1. Third + */ + + @Test + public void nested() { + + // wanted to use 1,2,3 as start numbers, but anything but `1` won't be treated as sub-list + + final Document document = document( + span(ORDERED_LIST, + args("start", 1), + text("First\n"), + span(ORDERED_LIST, + args("start", 1), + text("Second\n"), + span(ORDERED_LIST, + args("start", 1), + text("Third")))) + ); + + matchInput("ol.md", document); + } + + /* + 1. First + 2. Second + 3. Third + */ + @Test + public void two_spaces() { + // just a regular flat-list (no sub-lists) + + final Document document = document( + span(ORDERED_LIST, + args("start", 1), + text("First")), + text("\n"), + span(ORDERED_LIST, + args("start", 2), + text("Second")), + text("\n"), + span(ORDERED_LIST, + args("start", 3), + text("Third")) + ); + + matchInput("ol-2-spaces.md", document); + } + + /* + 5. Five + 6. Six + 7. Seven + */ + @Test + public void starts_with_5() { + + final Document document = document( + span(ORDERED_LIST, + args("start", 5), + text("Five")), + text("\n"), + span(ORDERED_LIST, + args("start", 6), + text("Six")), + text("\n"), + span(ORDERED_LIST, + args("start", 7), + text("Seven")) + ); + + matchInput("ol-starts-with-5.md", document); + } + + @Test + public void single() { + + final Document document = document( + span(ORDERED_LIST, + args("start", 1), + text("ol")) + ); + + matchInput("single-ol.md", document); + } +} diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/ParagraphTest.java b/markwon/src/test/java/ru/noties/markwon/core/suite/ParagraphTest.java new file mode 100644 index 00000000..79b678c5 --- /dev/null +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/ParagraphTest.java @@ -0,0 +1,43 @@ +package ru.noties.markwon.core.suite; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.annotation.Config; + +import ru.noties.markwon.test.TestSpan.Document; + +import static ru.noties.markwon.core.suite.TestFactory.PARAGRAPH; +import static ru.noties.markwon.test.TestSpan.document; +import static ru.noties.markwon.test.TestSpan.span; +import static ru.noties.markwon.test.TestSpan.text; + +@RunWith(RobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class ParagraphTest extends BaseSuiteTest { + + /* + So, this is a paragraph + + And this one is another + */ + + @Test + public void test() { + + final Document document = document( + span(PARAGRAPH, + text("So, this is a paragraph")), + text("\n\n"), + span(PARAGRAPH, + text("And this one is another")) + ); + + matchInput("paragraph.md", document); + } + + @Override + boolean useParagraphs() { + return true; + } +} diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/SecondTest.java b/markwon/src/test/java/ru/noties/markwon/core/suite/SecondTest.java new file mode 100644 index 00000000..65f238ed --- /dev/null +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/SecondTest.java @@ -0,0 +1,63 @@ +package ru.noties.markwon.core.suite; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.annotation.Config; + +import ru.noties.markwon.test.TestSpan.Document; + +import static ru.noties.markwon.core.suite.TestFactory.BLOCK_QUOTE; +import static ru.noties.markwon.core.suite.TestFactory.BOLD; +import static ru.noties.markwon.core.suite.TestFactory.CODE; +import static ru.noties.markwon.core.suite.TestFactory.HEADING; +import static ru.noties.markwon.core.suite.TestFactory.ITALIC; +import static ru.noties.markwon.test.TestSpan.args; +import static ru.noties.markwon.test.TestSpan.document; +import static ru.noties.markwon.test.TestSpan.span; +import static ru.noties.markwon.test.TestSpan.text; + +@RunWith(RobolectricTestRunner.class) +@Config(manifest = Config.NONE) +public class SecondTest extends BaseSuiteTest { + + /* +First **line** is *always* + +> Some quote here! + +# Header 1 +## Header 2 + +and `some code` and more: + +```java +the code in multiline +``` + */ + + @Test + public void test() { + + final Document document = document( + text("First "), + span(BOLD, text("line")), + text(" is "), + span(ITALIC, text("always")), + text("\n\n"), + span(BLOCK_QUOTE, text("Some quote here!")), + text("\n\n"), + span(HEADING, args("level", 1), text("Header 1")), + text("\n\n"), + span(HEADING, args("level", 2), text("Header 2")), + text("\n\n"), + text("and "), + span(CODE, args("multiline", false), text("\u00a0some code\u00a0")), + text(" and more:"), + text("\n\n"), + span(CODE, args("multiline", true), text("\u00a0\nthe code in multiline\n\u00a0")) + ); + + matchInput("second.md", document); + } +} diff --git a/markwon/src/test/java/ru/noties/markwon/core/suite/TestFactory.java b/markwon/src/test/java/ru/noties/markwon/core/suite/TestFactory.java index 222e2092..76e4dc03 100644 --- a/markwon/src/test/java/ru/noties/markwon/core/suite/TestFactory.java +++ b/markwon/src/test/java/ru/noties/markwon/core/suite/TestFactory.java @@ -19,6 +19,16 @@ class TestFactory implements SpannableFactory { static final String ITALIC = "italic"; static final String CODE = "code"; static final String LINK = "link"; + static final String BLOCK_QUOTE = "blockquote"; + static final String PARAGRAPH = "paragraph"; + static final String ORDERED_LIST = "ordered-list"; + static final String HEADING = "heading"; + + private final boolean useParagraphs; + + TestFactory(boolean useParagraphs) { + this.useParagraphs = useParagraphs; + } @Nullable @Override @@ -35,7 +45,7 @@ class TestFactory implements SpannableFactory { @Nullable @Override public Object blockQuote(@NonNull MarkwonTheme theme) { - return null; + return span(BLOCK_QUOTE); } @Nullable @@ -47,7 +57,7 @@ class TestFactory implements SpannableFactory { @Nullable @Override public Object orderedListItem(@NonNull MarkwonTheme theme, int startNumber) { - return null; + return span(ORDERED_LIST, args("start", startNumber)); } @Nullable @@ -65,13 +75,15 @@ class TestFactory implements SpannableFactory { @Nullable @Override public Object heading(@NonNull MarkwonTheme theme, int level) { - return null; + return span(HEADING, args("level", level)); } @Nullable @Override public Object paragraph(boolean inTightList) { - return null; + return useParagraphs + ? span(PARAGRAPH) + : null; } @Nullable diff --git a/markwon/src/test/resources/tests/nested-blockquotes.md b/markwon/src/test/resources/tests/nested-blockquotes.md new file mode 100644 index 00000000..08b25416 --- /dev/null +++ b/markwon/src/test/resources/tests/nested-blockquotes.md @@ -0,0 +1,3 @@ +> First +> > Second +> > > Third \ No newline at end of file diff --git a/markwon/src/test/resources/tests/nested-blockquotes.yaml b/markwon/src/test/resources/tests/nested-blockquotes.yaml deleted file mode 100644 index fbdb04b9..00000000 --- a/markwon/src/test/resources/tests/nested-blockquotes.yaml +++ /dev/null @@ -1,12 +0,0 @@ -input: |- - > First - > > Second - > > > Third - -output: - - blockquote: - - "First\n\n" - - blockquote: - - "Second\n\n" - - blockquote: - - "Third" \ No newline at end of file diff --git a/markwon/src/test/resources/tests/no-paragraphs.md b/markwon/src/test/resources/tests/no-paragraphs.md new file mode 100644 index 00000000..75fa2e29 --- /dev/null +++ b/markwon/src/test/resources/tests/no-paragraphs.md @@ -0,0 +1,3 @@ +This could be a paragraph + +But it is not and this one is not also \ No newline at end of file diff --git a/markwon/src/test/resources/tests/no-paragraphs.yaml b/markwon/src/test/resources/tests/no-paragraphs.yaml deleted file mode 100644 index 048f3ef4..00000000 --- a/markwon/src/test/resources/tests/no-paragraphs.yaml +++ /dev/null @@ -1,12 +0,0 @@ -input: |- - This could be a paragraph - - But it is not and this one is not also - -config: - use-paragraphs: false - -output: - - text: "This could be a paragraph" - - text: "\n\n" - - text: "But it is not and this one is not also" \ No newline at end of file diff --git a/markwon/src/test/resources/tests/ol-2-spaces.md b/markwon/src/test/resources/tests/ol-2-spaces.md new file mode 100644 index 00000000..08087952 --- /dev/null +++ b/markwon/src/test/resources/tests/ol-2-spaces.md @@ -0,0 +1,3 @@ +1. First + 2. Second + 3. Third \ No newline at end of file diff --git a/markwon/src/test/resources/tests/ol-2-spaces.yaml b/markwon/src/test/resources/tests/ol-2-spaces.yaml deleted file mode 100644 index 0ffd7adb..00000000 --- a/markwon/src/test/resources/tests/ol-2-spaces.yaml +++ /dev/null @@ -1,16 +0,0 @@ -description: "Will be rendered as simple flat list" - -input: |- - 1. First - 2. Second - 3. Third - -output: - - ol: "First" - start: 1 - - text: "\n" - - ol: "Second" - start: 2 - - text: "\n" - - ol: "Third" - start: 3 \ No newline at end of file diff --git a/markwon/src/test/resources/tests/ol-starts-with-5.md b/markwon/src/test/resources/tests/ol-starts-with-5.md new file mode 100644 index 00000000..384dba30 --- /dev/null +++ b/markwon/src/test/resources/tests/ol-starts-with-5.md @@ -0,0 +1,3 @@ +5. Five +6. Six +7. Seven \ No newline at end of file diff --git a/markwon/src/test/resources/tests/ol-starts-with-5.yaml b/markwon/src/test/resources/tests/ol-starts-with-5.yaml deleted file mode 100644 index eaabc7bb..00000000 --- a/markwon/src/test/resources/tests/ol-starts-with-5.yaml +++ /dev/null @@ -1,14 +0,0 @@ -input: |- - 5. Five - 6. Six - 7. Seven - -output: - - ol: "Five" - start: 5 - - text: "\n" - - ol: "Six" - start: 6 - - text: "\n" - - ol: "Seven" - start: 7 \ No newline at end of file diff --git a/markwon/src/test/resources/tests/ol.md b/markwon/src/test/resources/tests/ol.md new file mode 100644 index 00000000..d4e5b9db --- /dev/null +++ b/markwon/src/test/resources/tests/ol.md @@ -0,0 +1,3 @@ +1. First + 1. Second + 1. Third \ No newline at end of file diff --git a/markwon/src/test/resources/tests/ol.yaml b/markwon/src/test/resources/tests/ol.yaml deleted file mode 100644 index 246b84ba..00000000 --- a/markwon/src/test/resources/tests/ol.yaml +++ /dev/null @@ -1,14 +0,0 @@ -input: |- - 1. First - 1. Second - 1. Third - -output: - - ol: - - text: "First\n" - - ol: - - text: "Second\n" - - ol: "Third" - start: 1 - start: 1 - start: 1 \ No newline at end of file diff --git a/markwon/src/test/resources/tests/paragraph.md b/markwon/src/test/resources/tests/paragraph.md new file mode 100644 index 00000000..98fce9a0 --- /dev/null +++ b/markwon/src/test/resources/tests/paragraph.md @@ -0,0 +1,3 @@ +So, this is a paragraph + +And this one is another \ No newline at end of file diff --git a/markwon/src/test/resources/tests/paragraph.yaml b/markwon/src/test/resources/tests/paragraph.yaml deleted file mode 100644 index 862bbc06..00000000 --- a/markwon/src/test/resources/tests/paragraph.yaml +++ /dev/null @@ -1,12 +0,0 @@ -input: |- - So, this is a paragraph - - And this one is another - -config: - use-paragraphs: true - -output: - - p: "So, this is a paragraph" - - text: "\n\n" - - p: "And this one is another" \ No newline at end of file diff --git a/markwon/src/test/resources/tests/second.md b/markwon/src/test/resources/tests/second.md new file mode 100644 index 00000000..44410d75 --- /dev/null +++ b/markwon/src/test/resources/tests/second.md @@ -0,0 +1,12 @@ +First **line** is *always* + +> Some quote here! + +# Header 1 +## Header 2 + +and `some code` and more: + +```java +the code in multiline +``` \ No newline at end of file diff --git a/markwon/src/test/resources/tests/second.yaml b/markwon/src/test/resources/tests/second.yaml deleted file mode 100644 index e34e0270..00000000 --- a/markwon/src/test/resources/tests/second.yaml +++ /dev/null @@ -1,29 +0,0 @@ -input: |- - First **line** is *always* - - > Some quote here! - - # Header 1 - ## Header 2 - - and `some code` and more: - - ```java - the code in multiline - ``` - -output: - - text: "First " - - b: "line" - - text: " is " - - i: "always" - - text: "\n\n" - - blockquote: "Some quote here!" - - text: "\n\n" - - h1: "Header 1" - - text: "\n\n" - - h2: "Header 2" - - text: "\n\nand " - - code: "some code" - - text: " and more:\n\n" - - code-block: "the code in multiline" diff --git a/markwon/src/test/resources/tests/single-blockquote.md b/markwon/src/test/resources/tests/single-blockquote.md new file mode 100644 index 00000000..32ce4098 --- /dev/null +++ b/markwon/src/test/resources/tests/single-blockquote.md @@ -0,0 +1 @@ +> blockquote \ No newline at end of file diff --git a/markwon/src/test/resources/tests/single-blockquote.yaml b/markwon/src/test/resources/tests/single-blockquote.yaml deleted file mode 100644 index 3c8d818e..00000000 --- a/markwon/src/test/resources/tests/single-blockquote.yaml +++ /dev/null @@ -1,4 +0,0 @@ -input: "> blockquote" - -output: - - blockquote: "blockquote" \ No newline at end of file diff --git a/markwon/src/test/resources/tests/single-code-block.md b/markwon/src/test/resources/tests/single-code-block.md new file mode 100644 index 00000000..fc057a09 --- /dev/null +++ b/markwon/src/test/resources/tests/single-code-block.md @@ -0,0 +1,3 @@ +``` +code block +``` \ No newline at end of file diff --git a/markwon/src/test/resources/tests/single-code-block.yaml b/markwon/src/test/resources/tests/single-code-block.yaml deleted file mode 100644 index d44d9818..00000000 --- a/markwon/src/test/resources/tests/single-code-block.yaml +++ /dev/null @@ -1,7 +0,0 @@ -input: |- - ``` - code block - ``` - -output: - - code-block: "code block" \ No newline at end of file diff --git a/markwon/src/test/resources/tests/single-code.md b/markwon/src/test/resources/tests/single-code.md new file mode 100644 index 00000000..d3a84179 --- /dev/null +++ b/markwon/src/test/resources/tests/single-code.md @@ -0,0 +1 @@ +`code` \ No newline at end of file diff --git a/markwon/src/test/resources/tests/single-code.yaml b/markwon/src/test/resources/tests/single-code.yaml deleted file mode 100644 index e82d1123..00000000 --- a/markwon/src/test/resources/tests/single-code.yaml +++ /dev/null @@ -1,4 +0,0 @@ -input: "`code`" - -output: - - code: "code" \ No newline at end of file diff --git a/markwon/src/test/resources/tests/single-ol.md b/markwon/src/test/resources/tests/single-ol.md new file mode 100644 index 00000000..61a41e63 --- /dev/null +++ b/markwon/src/test/resources/tests/single-ol.md @@ -0,0 +1 @@ +1. ol \ No newline at end of file diff --git a/markwon/src/test/resources/tests/single-ol.yaml b/markwon/src/test/resources/tests/single-ol.yaml deleted file mode 100644 index a2046cb1..00000000 --- a/markwon/src/test/resources/tests/single-ol.yaml +++ /dev/null @@ -1,5 +0,0 @@ -input: "1. ol" - -output: - - ol: "ol" - start: 1 \ No newline at end of file