summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/resources/Trac4325.scala5
-rw-r--r--test/scaladoc/scala/html/HtmlFactoryTest.scala33
2 files changed, 38 insertions, 0 deletions
diff --git a/test/scaladoc/resources/Trac4325.scala b/test/scaladoc/resources/Trac4325.scala
new file mode 100644
index 0000000000..ffb968d571
--- /dev/null
+++ b/test/scaladoc/resources/Trac4325.scala
@@ -0,0 +1,5 @@
+case class WithSynthetic
+
+case class WithObject
+object WithObject
+
diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala
index 46267bff3f..0c9f7ff48d 100644
--- a/test/scaladoc/scala/html/HtmlFactoryTest.scala
+++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala
@@ -178,4 +178,37 @@ object Test extends Properties("HtmlFactory") {
case _ => false
}
}
+
+ property("Trac #4325 - files") = {
+ val files = createTemplates("Trac4325.scala")
+
+ files.get("WithSynthetic.html") != None &&
+ files.get("WithSynthetic$.html") == None &&
+ files.get("WithObject.html") != None &&
+ files.get("WithObject$.html") != None
+ }
+
+ property("Trac #4325 - Don't link to syntetic companion") = {
+ val files = createTemplates("Trac4325.scala")
+
+ files("WithSynthetic.html") match {
+ case node: scala.xml.Node => {
+ val s = node.toString
+ ! s.contains("""go to: <a href="WithSynthetic$.html">companion</a>""")
+ }
+ case _ => false
+ }
+ }
+
+ property("Trac #4325 - Link to companion") = {
+ val files = createTemplates("Trac4325.scala")
+
+ files("WithObject.html") match {
+ case node: scala.xml.Node => {
+ val s = node.toString
+ s.contains("""go to: <a href="WithObject$.html">companion</a>""")
+ }
+ case _ => false
+ }
+ }
}