summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-03-21 12:44:20 +0000
committerKato Kazuyoshi <kato.kazuyoshi@gmail.com>2011-03-21 12:44:20 +0000
commitb5d314af8ee4dcab49300ebdadc399298196f233 (patch)
tree5b63ad0b036c14d4e88e74090dfe885295880f9f
parent4d0cd60b0e2b9071bba2641da95c75332458193b (diff)
downloadscala-b5d314af8ee4dcab49300ebdadc399298196f233.tar.gz
scala-b5d314af8ee4dcab49300ebdadc399298196f233.tar.bz2
scala-b5d314af8ee4dcab49300ebdadc399298196f233.zip
[scaladoc] Add a test for #4361.
-rw-r--r--test/scaladoc/scala/model/CommentFactoryTest.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/scaladoc/scala/model/CommentFactoryTest.scala b/test/scaladoc/scala/model/CommentFactoryTest.scala
index 204baaa05b..afe27dace0 100644
--- a/test/scaladoc/scala/model/CommentFactoryTest.scala
+++ b/test/scaladoc/scala/model/CommentFactoryTest.scala
@@ -73,4 +73,26 @@ object Test extends Properties("CommentFactory") {
Chain(List(Text("One"), Text("\n"), Monospace("two"), Text(" three")))
)
+ property("Trac #4361 - ^...^") = parse(
+ """
+/**
+ * hello ^world^ */""",
+ Chain(List(Text("hello "), Superscript(Text("world"))))
+ )
+
+ property("Trac #4361 - single ^ symbol") = parse(
+ """
+/**
+ * <pre>
+ * hello ^world
+ * </pre>
+ *
+ */""",
+ Chain(List(Text(""), Text("\n"),
+ HtmlTag("<pre>"), Text("\n"),
+ Text("hello "), Chain(List(Text("^"),
+ Chain(List(Text("world"),
+ Text("\n"),
+ HtmlTag("</pre>")))))))
+ )
}