tests enhancements
diff --git a/core/src/test/java/org/tautua/markdownpapers/BaseTest.java b/core/src/test/java/org/tautua/markdownpapers/BaseTest.java
new file mode 100644
index 0000000..201a0ce
--- /dev/null
+++ b/core/src/test/java/org/tautua/markdownpapers/BaseTest.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2011, TAUTUA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tautua.markdownpapers;
+
+import org.custommonkey.xmlunit.HTMLDocumentBuilder;
+import org.custommonkey.xmlunit.TolerantSaxDocumentBuilder;
+import org.custommonkey.xmlunit.XMLAssert;
+import org.custommonkey.xmlunit.XMLUnit;
+import org.junit.Before;
+import org.junit.Test;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.*;
+
+/**
+ * Larry Ruiz
+ */
+public abstract class BaseTest {
+
+ private static final String DEFAULT_OUTPUT_EXTENSION = ".html";
+ private static final String DEFAULT_INPUT_EXTENSION = ".text";
+
+ protected String fileName;
+ private String inputExtension;
+ private String outputExtension;
+ private File inputDirectory;
+ private File outputDirectory;
+
+ protected BaseTest(String fileName, File inputDirectory, File outputDirectory) {
+ this(fileName, inputDirectory, outputDirectory, DEFAULT_INPUT_EXTENSION, DEFAULT_OUTPUT_EXTENSION);
+ }
+
+ protected BaseTest(String fileName, File inputDirectory, File outputDirectory, String inputExtension, String outputExtension) {
+ this.fileName = fileName;
+ this.inputDirectory = inputDirectory;
+ this.outputDirectory = outputDirectory;
+ this.inputExtension = inputExtension;
+ this.outputExtension = outputExtension;
+ }
+
+
+ protected static void transform(File in, File out) throws Exception {
+ Markdown md = new Markdown();
+ Reader r = new FileReader(in);
+ Writer w = new FileWriter(out);
+ md.transform(r, w);
+ r.close();
+ w.close();
+ }
+
+ /**
+ * <p>Compare two xml files, whitespace and attribute order are ignored.</p>
+ * @param expected
+ * @param output
+ * @throws java.io.IOException
+ * @throws org.xml.sax.SAXException
+ * @throws javax.xml.parsers.ParserConfigurationException
+ */
+ protected static void compare(File expected, File output) throws IOException, SAXException, ParserConfigurationException {
+ XMLUnit.setIgnoreWhitespace(true);
+ XMLUnit.setIgnoreAttributeOrder(true);
+ TolerantSaxDocumentBuilder tolerantSaxDocumentBuilder = new TolerantSaxDocumentBuilder(XMLUnit.newTestParser());
+ HTMLDocumentBuilder htmlDocumentBuilder = new HTMLDocumentBuilder(tolerantSaxDocumentBuilder);
+ org.w3c.dom.Document e = htmlDocumentBuilder.parse(new FileReader(expected));
+ org.w3c.dom.Document o = htmlDocumentBuilder.parse(new FileReader(output));
+ XMLAssert.assertXMLEqual(e, o);
+ }
+
+ @Before
+ public void setup() {
+ if (!outputDirectory.exists()) {
+ outputDirectory.mkdirs();
+ }
+ }
+
+ @Test
+ public void execute() throws Exception {
+ File input = new File(inputDirectory, fileName + inputExtension);
+ File expected = new File(inputDirectory, fileName + outputExtension);
+ File output = new File(outputDirectory, fileName + outputExtension);
+ transform(input, output);
+ compare(expected, output);
+ }
+}
diff --git a/core/src/test/java/org/tautua/markdownpapers/MarkdownPapersTest.java b/core/src/test/java/org/tautua/markdownpapers/MarkdownPapersTest.java
new file mode 100644
index 0000000..3486b36
--- /dev/null
+++ b/core/src/test/java/org/tautua/markdownpapers/MarkdownPapersTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2011, TAUTUA
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tautua.markdownpapers;
+
+import java.io.*;
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(LabelledParameterized.class)
+public class MarkdownPapersTest extends BaseTest {
+
+ public MarkdownPapersTest(String fileName) {
+ super(fileName, new File("target/test-classes/others"), new File("target/output/others"));
+ }
+
+ @Parameters
+ public static List<Object[]> data() throws FileNotFoundException {
+ return Arrays.asList(new Object[][]{
+ {"code"},
+ {"comments"},
+ {"headers"},
+ {"inline"},
+ {"list"},
+ {"paragraphs"},
+ {"quoteAndList"},
+ {"quotes"},
+ {"rulers"},
+ {"snippets"},
+ {"tags"},
+ {"underscore"}
+ });
+ }
+}
diff --git a/core/src/test/java/org/tautua/markdownpapers/Markdown_1_0_Test.java b/core/src/test/java/org/tautua/markdownpapers/Markdown_1_0_Test.java
index ab72812..66d72c5 100644
--- a/core/src/test/java/org/tautua/markdownpapers/Markdown_1_0_Test.java
+++ b/core/src/test/java/org/tautua/markdownpapers/Markdown_1_0_Test.java
@@ -16,17 +16,8 @@
package org.tautua.markdownpapers;
-import org.custommonkey.xmlunit.HTMLDocumentBuilder;
-import org.custommonkey.xmlunit.TolerantSaxDocumentBuilder;
-import org.custommonkey.xmlunit.XMLAssert;
-import org.custommonkey.xmlunit.XMLUnit;
-import org.junit.BeforeClass;
-import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized.Parameters;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.ParserConfigurationException;
import java.io.*;
import java.util.Arrays;
import java.util.List;
@@ -35,23 +26,12 @@
* @author Larry Ruiz
*/
@RunWith(LabelledParameterized.class)
-public class Markdown_1_0_Test {
+public class Markdown_1_0_Test extends BaseTest {
private static final File OUTPUT_DIR = new File("target/output/1.0");
private static final File INPUT_DIR = new File("target/test-classes/1.0");
- private static final String INPUT_SUFFIX = ".text";
- private static final String OUTPUT_SUFFIX = ".html";
-
- private String fileName;
public Markdown_1_0_Test(String fileName) {
- this.fileName = fileName;
- }
-
- @BeforeClass
- public static void setup() {
- if (!OUTPUT_DIR.exists()) {
- OUTPUT_DIR.mkdirs();
- }
+ super(fileName, INPUT_DIR, OUTPUT_DIR);
}
@Parameters
@@ -78,40 +58,4 @@
{"Tidyness"}
});
}
-
- @Test
- public void execute() throws Exception {
- File input = new File(INPUT_DIR, fileName + INPUT_SUFFIX);
- File expected = new File(INPUT_DIR, fileName + OUTPUT_SUFFIX);
- File output = new File(OUTPUT_DIR, fileName + OUTPUT_SUFFIX);
- transform(input, output);
- compare(expected, output);
- }
-
- private static void transform(File in, File out) throws Exception {
- Markdown md = new Markdown();
- Reader r = new FileReader(in);
- Writer w = new FileWriter(out);
- md.transform(r, w);
- r.close();
- w.close();
- }
-
- /**
- * <p>Compare two xml files, whitespace and attribute order are ignored.</p>
- * @param expected
- * @param output
- * @throws java.io.IOException
- * @throws org.xml.sax.SAXException
- * @throws javax.xml.parsers.ParserConfigurationException
- */
- private static void compare(File expected, File output) throws IOException, SAXException, ParserConfigurationException {
- XMLUnit.setIgnoreWhitespace(true);
- XMLUnit.setIgnoreAttributeOrder(true);
- TolerantSaxDocumentBuilder tolerantSaxDocumentBuilder = new TolerantSaxDocumentBuilder(XMLUnit.newTestParser());
- HTMLDocumentBuilder htmlDocumentBuilder = new HTMLDocumentBuilder(tolerantSaxDocumentBuilder);
- org.w3c.dom.Document e = htmlDocumentBuilder.parse(new FileReader(expected));
- org.w3c.dom.Document o = htmlDocumentBuilder.parse(new FileReader(output));
- XMLAssert.assertXMLEqual(e,o);
- }
}
diff --git a/core/src/test/java/org/tautua/markdownpapers/Markdown_1_1_Test.java b/core/src/test/java/org/tautua/markdownpapers/Markdown_1_1_Test.java
index 3c29264..03f5193 100644
--- a/core/src/test/java/org/tautua/markdownpapers/Markdown_1_1_Test.java
+++ b/core/src/test/java/org/tautua/markdownpapers/Markdown_1_1_Test.java
@@ -16,17 +16,8 @@
package org.tautua.markdownpapers;
-import org.custommonkey.xmlunit.HTMLDocumentBuilder;
-import org.custommonkey.xmlunit.TolerantSaxDocumentBuilder;
-import org.custommonkey.xmlunit.XMLAssert;
-import org.custommonkey.xmlunit.XMLUnit;
-import org.junit.BeforeClass;
-import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized.Parameters;
-import org.xml.sax.SAXException;
-
-import javax.xml.parsers.ParserConfigurationException;
import java.io.*;
import java.util.Arrays;
import java.util.List;
@@ -35,23 +26,12 @@
* @author Larry Ruiz
*/
@RunWith(LabelledParameterized.class)
-public class Markdown_1_1_Test {
+public class Markdown_1_1_Test extends BaseTest {
private static final File OUTPUT_DIR = new File("target/output/1.1/basics");
private static final File INPUT_DIR = new File("target/test-classes/1.1/basics");
- private static final String INPUT_SUFFIX = ".text";
- private static final String OUTPUT_SUFFIX = ".xhtml";
-
- private String fileName;
public Markdown_1_1_Test(String fileName) {
- this.fileName = fileName;
- }
-
- @BeforeClass
- public static void setup() {
- if (!OUTPUT_DIR.exists()) {
- OUTPUT_DIR.mkdirs();
- }
+ super(fileName, INPUT_DIR, OUTPUT_DIR, ".text", ".xhtml");
}
@Parameters
@@ -83,38 +63,4 @@
});
}
- @Test
- public void execute() throws Exception {
- File input = new File(INPUT_DIR, fileName + INPUT_SUFFIX);
- File expected = new File(INPUT_DIR, fileName + OUTPUT_SUFFIX);
- File output = new File(OUTPUT_DIR, fileName + OUTPUT_SUFFIX);
- transform(input, output);
- compare(expected, output);
- }
-
- private static void transform(File in, File out) throws Exception {
- Markdown md = new Markdown();
- Reader r = new FileReader(in);
- Writer w = new FileWriter(out);
- md.transform(r, w);
- r.close();
- w.close();
- }
-
- /**
- * <p>Compare the two xml files, ignoring whitespace.</p>
- * @param expected
- * @param output
- * @throws IOException
- * @throws SAXException
- * @throws ParserConfigurationException
- */
- private static void compare(File expected, File output) throws IOException, SAXException, ParserConfigurationException {
- XMLUnit.setIgnoreWhitespace(true);
- TolerantSaxDocumentBuilder tolerantSaxDocumentBuilder = new TolerantSaxDocumentBuilder(XMLUnit.newTestParser());
- HTMLDocumentBuilder htmlDocumentBuilder = new HTMLDocumentBuilder(tolerantSaxDocumentBuilder);
- org.w3c.dom.Document e = htmlDocumentBuilder.parse(new FileReader(expected));
- org.w3c.dom.Document o = htmlDocumentBuilder.parse(new FileReader(output));
- XMLAssert.assertXMLEqual(e,o);
- }
}
diff --git a/core/src/test/java/org/tautua/markdownpapers/ParserTest.java b/core/src/test/java/org/tautua/markdownpapers/ParserTest.java
deleted file mode 100644
index cf8b6a5..0000000
--- a/core/src/test/java/org/tautua/markdownpapers/ParserTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2011, TAUTUA
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.tautua.markdownpapers;
-
-import java.io.*;
-import java.util.Arrays;
-import java.util.List;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.tautua.markdownpapers.ast.Document;
-import org.tautua.markdownpapers.parser.Parser;
-import org.tautua.markdownpapers.parser.ParseException;
-
-import static org.junit.Assert.assertNotNull;
-
-@RunWith(Parameterized.class)
-public class ParserTest {
- private Reader reader;
- private static final File INPUT_DIR = new File("target/test-classes/");
-
- public ParserTest(Reader reader) {
- this.reader = reader;
- }
-
- @Parameterized.Parameters
- public static List<Object[]> data() throws FileNotFoundException {
- return Arrays.asList(new Object[][]{
- {getStringReader("")},
- {getAssetReader("code")},
- {getAssetReader("comments")},
- {getAssetReader("headers")},
- {getAssetReader("inline")},
- {getAssetReader("list")},
- {getAssetReader("paragraphs")},
- {getAssetReader("quoteAndList")},
- {getAssetReader("quotes")},
- {getAssetReader("rulers")},
- {getAssetReader("snippets")},
- {getAssetReader("tags")},
- {getAssetReader("underscore")},
- });
- }
-
- @Test
- public void execute() throws ParseException, FileNotFoundException {
- Object obj = parse(reader);
- assertNotNull(obj);
- }
-
- static Document parse(Reader reader) throws ParseException {
- Parser parser = new Parser(reader);
- return parser.parse();
- }
-
- static Reader getAssetReader(String assetName) throws FileNotFoundException {
- return new FileReader(new File(INPUT_DIR, assetName + ".text"));
- }
-
- static Reader getStringReader(String string) {
- return new StringReader(string);
- }
-}
diff --git a/core/src/test/resources/inline.text b/core/src/test/resources/inline.text
deleted file mode 100644
index 025efa4..0000000
--- a/core/src/test/resources/inline.text
+++ /dev/null
@@ -1 +0,0 @@
-[link](http://dummyurl "title"), **emp**, __emp__, \*escapedchar\*
\ No newline at end of file
diff --git a/core/src/test/resources/others/code.html b/core/src/test/resources/others/code.html
new file mode 100644
index 0000000..96317b9
--- /dev/null
+++ b/core/src/test/resources/others/code.html
@@ -0,0 +1,8 @@
+<pre><code>
+___
+
+code line1
+code line2
+
+code line3
+</code></pre>
\ No newline at end of file
diff --git a/core/src/test/resources/code.text b/core/src/test/resources/others/code.text
similarity index 100%
rename from core/src/test/resources/code.text
rename to core/src/test/resources/others/code.text
diff --git a/core/src/test/resources/others/comments.html b/core/src/test/resources/others/comments.html
new file mode 100644
index 0000000..c32943b
--- /dev/null
+++ b/core/src/test/resources/others/comments.html
@@ -0,0 +1,9 @@
+<!-- comment 1 -->
+
+<!--
+ comment 2
+-->
+
+<p>With no comment <!-- Hello</p>
+
+<p>World --></p>
\ No newline at end of file
diff --git a/core/src/test/resources/comments.text b/core/src/test/resources/others/comments.text
similarity index 100%
rename from core/src/test/resources/comments.text
rename to core/src/test/resources/others/comments.text
diff --git a/core/src/test/resources/others/headers.html b/core/src/test/resources/others/headers.html
new file mode 100644
index 0000000..fa75746
--- /dev/null
+++ b/core/src/test/resources/others/headers.html
@@ -0,0 +1,6 @@
+<h1> H1 </h1>
+<h2> H2 </h2>
+<h3> H3 </h3>
+<h4> H4 </h4>
+<h5> H5 </h5>
+<h6> H6 </h6>
diff --git a/core/src/test/resources/headers.text b/core/src/test/resources/others/headers.text
similarity index 100%
rename from core/src/test/resources/headers.text
rename to core/src/test/resources/others/headers.text
diff --git a/core/src/test/resources/others/inline.html b/core/src/test/resources/others/inline.html
new file mode 100644
index 0000000..7f67fce
--- /dev/null
+++ b/core/src/test/resources/others/inline.html
@@ -0,0 +1 @@
+<p><a href="http://wikipedia.org/wiki_(computing)" title="wikipedia">a link</a>, <strong>emp</strong>, <strong>emp</strong>, *escapedchar*</p>
\ No newline at end of file
diff --git a/core/src/test/resources/others/inline.text b/core/src/test/resources/others/inline.text
new file mode 100644
index 0000000..c09e1a3
--- /dev/null
+++ b/core/src/test/resources/others/inline.text
@@ -0,0 +1,2 @@
+[a link](http://wikipedia.org/wiki_(computing) "wikipedia"), **emp**, __emp__, \*escapedchar\*
+
diff --git a/core/src/test/resources/others/list.html b/core/src/test/resources/others/list.html
new file mode 100644
index 0000000..8bbf8c7
--- /dev/null
+++ b/core/src/test/resources/others/list.html
@@ -0,0 +1,13 @@
+<p>Same thing but with paragraphs:</p>
+
+<ol>
+ <li><p>First</p></li>
+ <li><p>Second:</p>
+ <ul>
+ <li>Fee</li>
+ <li>Fie</li>
+ <li>Foe</li>
+ </ul>
+ </li>
+ <li><p>Third</p></li>
+</ol>
\ No newline at end of file
diff --git a/core/src/test/resources/list.text b/core/src/test/resources/others/list.text
similarity index 100%
rename from core/src/test/resources/list.text
rename to core/src/test/resources/others/list.text
diff --git a/core/src/test/resources/others/paragraphs.html b/core/src/test/resources/others/paragraphs.html
new file mode 100644
index 0000000..625b7b3
--- /dev/null
+++ b/core/src/test/resources/others/paragraphs.html
@@ -0,0 +1,27 @@
+
+
+<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas neque mauris, sodales sed condimentum gravida,
+pellentesque quis lectus. Vivamus est eros, pretium at mattis eu, egestas sed justo. Quisque ipsum ligula, consequat
+in cursus sit amet, blandit vitae nisi. Donec tincidunt sem id neque sodales commodo. Suspendisse hendrerit
+sollicitudin pretium. Integer tincidunt nulla in nulla rutrum volutpat. Vivamus sodales iaculis ornare. Aenean tellus
+nulla, sollicitudin in pharetra sit amet, porta quis risus. Praesent non turpis vitae nibh congue venenatis. Curabitur
+lobortis, velit vel lacinia vestibulum, tortor urna tempor ipsum, vel facilisis velit turpis id augue. Nunc nec congue
+turpis. Sed dolor metus, lacinia sagittis aliquam id, consequat eu metus. Vivamus ornare mi nec massa aliquam et congue
+magna elementum. Morbi et erat diam, at feugiat justo. Vivamus magna dolor, aliquam vel semper vitae, iaculis nec
+neque. Aliquam sed neque eu est convallis venenatis ut mattis dolor. Donec feugiat, nisi et tempus tincidunt,
+felis risus elementum lorem, at tincidunt nibh risus et velit. Duis tempor elit eget nisl lobortis ac pretium mi
+laoreet.</p>
+
+<p>Fusce varius, magna ultrices suscipit eleifend, ligula mauris auctor nisi, nec eleifend eros felis at est. Morbi non
+metus nisi, in eleifend quam. Maecenas eu erat ac mi consequat eleifend. Donec placerat, tortor a lobortis tempus, dui
+nibh euismod massa, vitae scelerisque lacus tellus vel mi. Curabitur ut metus elit. Suspendisse feugiat ullamcorper
+metus ut feugiat. Nunc posuere quam id felis posuere rhoncus. Cras pellentesque turpis vitae turpis auctor id tempus
+mauris laoreet. Pellentesque sit amet orci sit amet velit lacinia tristique eu a neque. Phasellus gravida feugiat
+massa, in ultricies tortor sollicitudin vitae. Praesent ultricies posuere magna aliquet sagittis.</p>
+
+<p>Phasellus mauris tortor, vehicula nec elementum sed, convallis bibendum risus. Quisque eu magna purus, quis pulvinar
+est. Curabitur suscipit diam eget nunc convallis cursus. Donec fermentum justo sed sem condimentum vel fermentum nulla
+imperdiet. In eget tellus lorem. Aliquam tellus mauris, pretium in tristique ac, elementum ac ante. Pellentesque
+convallis condimentum tempus. In vulputate, velit et sodales elementum, augue eros elementum nisi, ut iaculis nulla
+tortor in nisi. In scelerisque molestie libero laoreet placerat. Praesent id felis nulla. Etiam molestie
+condimentum tempus.</p>
\ No newline at end of file
diff --git a/core/src/test/resources/paragraphs.text b/core/src/test/resources/others/paragraphs.text
similarity index 100%
rename from core/src/test/resources/paragraphs.text
rename to core/src/test/resources/others/paragraphs.text
diff --git a/core/src/test/resources/others/quoteAndList.html b/core/src/test/resources/others/quoteAndList.html
new file mode 100644
index 0000000..474db9d
--- /dev/null
+++ b/core/src/test/resources/others/quoteAndList.html
@@ -0,0 +1,10 @@
+<blockquote>
+ <ol>
+ <li>i1</li>
+ </ol>
+ <blockquote>
+ <ol>
+ <li>i1.1</li>
+ </ol>
+ </blockquote>
+</blockquote>
\ No newline at end of file
diff --git a/core/src/test/resources/others/quoteAndList.text b/core/src/test/resources/others/quoteAndList.text
new file mode 100644
index 0000000..cfa99e4
--- /dev/null
+++ b/core/src/test/resources/others/quoteAndList.text
@@ -0,0 +1,3 @@
+> 1. i1
+>
+> > 1. i1.1
\ No newline at end of file
diff --git a/core/src/test/resources/others/quotes.html b/core/src/test/resources/others/quotes.html
new file mode 100644
index 0000000..ae8a66e
--- /dev/null
+++ b/core/src/test/resources/others/quotes.html
@@ -0,0 +1,11 @@
+<blockquote>
+ <p>p1 line1
+p1 line2</p>
+
+<p>p2 line1
+p2 line2</p>
+
+<blockquote>
+ <p>p3 line 1</p>
+</blockquote>
+</blockquote>
diff --git a/core/src/test/resources/quotes.text b/core/src/test/resources/others/quotes.text
similarity index 100%
rename from core/src/test/resources/quotes.text
rename to core/src/test/resources/others/quotes.text
diff --git a/core/src/test/resources/others/rulers.html b/core/src/test/resources/others/rulers.html
new file mode 100644
index 0000000..1c02764
--- /dev/null
+++ b/core/src/test/resources/others/rulers.html
@@ -0,0 +1,33 @@
+<hr/>
+<hr/>
+<hr/>
+<hr/>
+<hr/>
+
+<hr/>
+<hr/>
+<hr/>
+<hr/>
+<hr/>
+
+<hr/>
+<hr/>
+<hr/>
+<hr/>
+<hr/>
+
+<p>NOT RULERS</p>
+
+<ul>
+<li>- -</li>
+<li> - -</li>
+</ul>
+
+<p>_ _ _
+_ _ _</p>
+
+<ul>
+<li> * *</li>
+<li>* *</li>
+</ul>
+
diff --git a/core/src/test/resources/rulers.text b/core/src/test/resources/others/rulers.text
similarity index 90%
rename from core/src/test/resources/rulers.text
rename to core/src/test/resources/others/rulers.text
index 2773e53..8c7a746 100644
--- a/core/src/test/resources/rulers.text
+++ b/core/src/test/resources/others/rulers.text
@@ -1,25 +1,33 @@
---
- - -
- - -
-- - -
-- - -
- - -
- - -
___
_ _ _
_ _ _
-_ _ _
-_ _ _
+
+
_ _ _
_ _ _
***
* * *
* * *
-* * *
-* * *
+
+
* * *
* * *
+NOT RULERS
+
+- - -
+- - -
+
+_ _ _
+_ _ _
+
+* * *
+* * *
\ No newline at end of file
diff --git a/core/src/test/resources/others/snippets.html b/core/src/test/resources/others/snippets.html
new file mode 100644
index 0000000..90e45d9
--- /dev/null
+++ b/core/src/test/resources/others/snippets.html
@@ -0,0 +1,13 @@
+<p><em>emphasis</em></p>
+
+<ul>
+<li>notemphasis *</li>
+</ul>
+
+<p><strong>bold</strong></p>
+
+<p>** notbold **</p>
+
+<p>hello world !</p>
+
+<p>lorem ipsum ________</p>
\ No newline at end of file
diff --git a/core/src/test/resources/snippets.text b/core/src/test/resources/others/snippets.text
similarity index 100%
rename from core/src/test/resources/snippets.text
rename to core/src/test/resources/others/snippets.text
diff --git a/core/src/test/resources/tags.text b/core/src/test/resources/others/tags.html
similarity index 100%
copy from core/src/test/resources/tags.text
copy to core/src/test/resources/others/tags.html
diff --git a/core/src/test/resources/tags.text b/core/src/test/resources/others/tags.text
similarity index 100%
rename from core/src/test/resources/tags.text
rename to core/src/test/resources/others/tags.text
diff --git a/core/src/test/resources/others/underscore.html b/core/src/test/resources/others/underscore.html
new file mode 100644
index 0000000..60f6020
--- /dev/null
+++ b/core/src/test/resources/others/underscore.html
@@ -0,0 +1,11 @@
+<h1> First header</h1>
+
+<ul>
+ <li>Invisible underscore: _, c.</li>
+</ul>
+
+<h1> Second header</h1>
+
+<ul>
+ <li>Invisible underscore: myimage_widthxheight.png</li>
+</ul>
diff --git a/core/src/test/resources/underscore.text b/core/src/test/resources/others/underscore.text
similarity index 100%
rename from core/src/test/resources/underscore.text
rename to core/src/test/resources/others/underscore.text
diff --git a/core/src/test/resources/quoteAndList.text b/core/src/test/resources/quoteAndList.text
deleted file mode 100644
index 8392ba6..0000000
--- a/core/src/test/resources/quoteAndList.text
+++ /dev/null
@@ -1,9 +0,0 @@
-
-> 1. i1
-> 1. i1.1
-> 2. i2
-> 1. i2.1
-> 2. i2.2
->
-> 1. i1
-> > 1. i1.1
\ No newline at end of file