aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-markdown/src/test
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-05-07 18:21:00 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-05-07 18:21:07 +0200
commit9eae24f08d44a07ea8159b1ceb29f16fcb0ae361 (patch)
tree66bddb4c1b1c3284f80c09fcf15eb1cfc50479c7 /sonar-markdown/src/test
parent06cd07f0685459b11c9478aa729bea4a8ddbdf5f (diff)
downloadsonarqube-9eae24f08d44a07ea8159b1ceb29f16fcb0ae361.tar.gz
sonarqube-9eae24f08d44a07ea8159b1ceb29f16fcb0ae361.zip
SONAR-4681 Add support for headings in SQ Markdown
Diffstat (limited to 'sonar-markdown/src/test')
-rw-r--r--sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java
index 13b0099976a..d2e78c4d4d0 100644
--- a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java
+++ b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java
@@ -53,6 +53,13 @@ public class MarkdownTest {
}
@Test
+ public void shouldDecorateHeadings() {
+ assertThat(Markdown.convertToHtml(" = Top\r== Sub\r\n=== Subsub\n ==== \n 1.five"))
+ .isEqualTo("<h1>Top\r</h1><h2>Sub\r\n</h2><h3>Subsub\n</h3><h4></h4> 1.five");
+ }
+
+
+ @Test
public void shouldDecorateMixedOrderedAndUnorderedList() {
assertThat(Markdown.convertToHtml(" 1. one\r* two\r\n1. three\n * \n 1.five"))
.isEqualTo("<ol><li>one</li>\r</ol><ul><li>two</li>\r\n</ul><ol><li>three</li>\n</ol><ul><li> </li>\n</ul> 1.five");