summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
authorPaweł Wiejacha <pawel.wiejacha@gmail.com>2014-08-22 09:15:01 +0200
committerPaweł Wiejacha <pawel.wiejacha@gmail.com>2014-09-03 00:12:04 +0200
commit2b5ac5aa5fe46bd3eb3eba3de2eca68a09833703 (patch)
treed2e81d7ca5f96bba40b76a25e31f6d29551493ec /test/scaladoc
parentb38fc5eaac3eb938902fe56a69e44830d41c1f87 (diff)
downloadscala-2b5ac5aa5fe46bd3eb3eba3de2eca68a09833703.tar.gz
scala-2b5ac5aa5fe46bd3eb3eba3de2eca68a09833703.tar.bz2
scala-2b5ac5aa5fe46bd3eb3eba3de2eca68a09833703.zip
SI-8810 scaladoc: fixed code block indentation normalization
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/resources/code-indent.scala6
-rw-r--r--test/scaladoc/scalacheck/HtmlFactoryTest.scala7
2 files changed, 10 insertions, 3 deletions
diff --git a/test/scaladoc/resources/code-indent.scala b/test/scaladoc/resources/code-indent.scala
index 88946ffc7f..2eee3352b4 100644
--- a/test/scaladoc/resources/code-indent.scala
+++ b/test/scaladoc/resources/code-indent.scala
@@ -20,6 +20,12 @@
* an alternative
* the e l s e branch
* }}}
+ * {{{
+ * Trait example {
+ * Val x = a
+ * Val y = b
+ * }
+ * }}}
* NB: Trailing spaces are necessary for this test!
* {{{
* l1
diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
index ef70e0bf21..da0f253a37 100644
--- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala
+++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
@@ -659,6 +659,7 @@ object Test extends Properties("HtmlFactory") {
s.contains("<pre>two lines, one useful</pre>") &&
s.contains("<pre>line1\nline2\nline3\nline4</pre>") &&
s.contains("<pre>a ragged example\na (condition)\n the t h e n branch\nan alternative\n the e l s e branch</pre>") &&
+ s.contains("<pre>Trait example {\n Val x = a\n Val y = b\n}</pre>") &&
s.contains("<pre>l1\n\nl2\n\nl3\n\nl4\n\nl5</pre>")
}
case _ => false
@@ -683,7 +684,7 @@ object Test extends Properties("HtmlFactory") {
oneAuthor match {
case node: scala.xml.Node => {
val s = node.toString
- s.contains("<h6>Author:</h6>")
+ s.contains("<h6>Author:</h6>") &&
s.contains("<p>The Only Author\n</p>")
}
case _ => false
@@ -696,8 +697,8 @@ object Test extends Properties("HtmlFactory") {
twoAuthors match {
case node: scala.xml.Node => {
val s = node.toString
- s.contains("<h6>Authors:</h6>")
- s.contains("<p>The First Author\n</p>")
+ s.contains("<h6>Authors:</h6>") &&
+ s.contains("<p>The First Author</p>") &&
s.contains("<p>The Second Author\n</p>")
}
case _ => false