diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2012-02-16 19:01:04 +0100 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2012-02-16 19:01:04 +0100 |
commit | cd4a931a8de29b68aa3bdfedd2f030c00a369ae0 (patch) | |
tree | 892515ed3241efeb95b1e486d4cf0da987b3375b /sonar-markdown/src/test | |
parent | 89c2abe481c82ce878e4142d9e115c4178b36e5b (diff) | |
download | sonarqube-cd4a931a8de29b68aa3bdfedd2f030c00a369ae0.tar.gz sonarqube-cd4a931a8de29b68aa3bdfedd2f030c00a369ae0.zip |
SONAR-3269 Add multiline code support on Sonar markdown
Diffstat (limited to 'sonar-markdown/src/test')
-rw-r--r-- | sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java | 6 |
1 files changed, 6 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 7ececab3ebc..982afa58f26 100644 --- a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java +++ b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java @@ -51,6 +51,12 @@ public class MarkdownTest { } @Test + public void shouldDecorateMultipleLineCode() { + assertThat(Markdown.convertToHtml("This is a ``line of code\nOn multiple lines``"), is("This is a <pre><code>line of code\nOn multiple lines</code></pre>")); + assertThat(Markdown.convertToHtml("This is not a ``line of code\nOn multiple lines"), is("This is not a ``line of code<br/>On multiple lines")); + } + + @Test public void shouldEmphaseText() { assertThat(Markdown.convertToHtml("This is *important*"), is("This is <em>important</em>")); assertThat(Markdown.convertToHtml("This should not be * \n emphase"), is("This should not be * <br/> emphase")); |