summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/scalacheck/CommentFactoryTest.scala20
-rw-r--r--test/scaladoc/scalacheck/HtmlFactoryTest.scala4
2 files changed, 21 insertions, 3 deletions
diff --git a/test/scaladoc/scalacheck/CommentFactoryTest.scala b/test/scaladoc/scalacheck/CommentFactoryTest.scala
index ff64a25602..d30b78087c 100644
--- a/test/scaladoc/scalacheck/CommentFactoryTest.scala
+++ b/test/scaladoc/scalacheck/CommentFactoryTest.scala
@@ -24,8 +24,11 @@ class Factory(val g: Global, val s: doc.Settings)
}
}
+ def getComment(s: String): Comment =
+ parse(s, "", scala.tools.nsc.util.NoPosition, null)
+
def parseComment(s: String): Option[Inline] =
- strip(parse(s, "", scala.tools.nsc.util.NoPosition, null))
+ strip(getComment(s))
def createBody(s: String) =
parse(s, "", scala.tools.nsc.util.NoPosition, null).body
@@ -166,4 +169,19 @@ object Test extends Properties("CommentFactory") {
}
}
+ property("Empty parameter text should be empty") = {
+ // used to fail with
+ // body == Body(List(Paragraph(Chain(List(Summary(Text('\n')))))))
+ factory.getComment(
+ """
+/**
+ * @deprecated
+ */
+ """).deprecated match {
+ case Some(Body(l)) if l.isEmpty => true
+ case other =>
+ println(other)
+ false
+ }
+ }
}
diff --git a/test/scaladoc/scalacheck/HtmlFactoryTest.scala b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
index 51633be440..6a6b1f8901 100644
--- a/test/scaladoc/scalacheck/HtmlFactoryTest.scala
+++ b/test/scaladoc/scalacheck/HtmlFactoryTest.scala
@@ -685,7 +685,7 @@ object Test extends Properties("HtmlFactory") {
case node: scala.xml.Node => {
val s = node.toString
s.contains("<h6>Author:</h6>") &&
- s.contains("<p>The Only Author\n</p>")
+ s.contains("<p>The Only Author</p>")
}
case _ => false
}
@@ -699,7 +699,7 @@ object Test extends Properties("HtmlFactory") {
val s = node.toString
s.contains("<h6>Authors:</h6>") &&
s.contains("<p>The First Author</p>") &&
- s.contains("<p>The Second Author\n</p>")
+ s.contains("<p>The Second Author</p>")
}
case _ => false
}