summaryrefslogtreecommitdiff
path: root/test/scaladoc
diff options
context:
space:
mode:
Diffstat (limited to 'test/scaladoc')
-rw-r--r--test/scaladoc/resources/Trac4374.scala5
-rw-r--r--test/scaladoc/scala/html/HtmlFactoryTest.scala24
2 files changed, 29 insertions, 0 deletions
diff --git a/test/scaladoc/resources/Trac4374.scala b/test/scaladoc/resources/Trac4374.scala
new file mode 100644
index 0000000000..4dd8ba2ae8
--- /dev/null
+++ b/test/scaladoc/resources/Trac4374.scala
@@ -0,0 +1,5 @@
+class WithPublic
+object WithPublic
+
+class WithPrivate
+private object WithPrivate
diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala
index 853a7c0fd2..ab76cbc7fc 100644
--- a/test/scaladoc/scala/html/HtmlFactoryTest.scala
+++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala
@@ -130,4 +130,28 @@ object Test extends Properties("HtmlFactory") {
case _ => false
}
}
+
+ property("Trac #4374 - public") = {
+ val files = createTemplates("Trac4374.scala")
+ files("WithPublic.html") match {
+ case node: scala.xml.Node => {
+ val s = node.toString
+ s.contains("""go to: <a href="WithPublic$.html">companion</a>""") &&
+ files.get("WithPublic$.html") != None
+ }
+ case _ => false
+ }
+ }
+
+ property("Trac #4374 - private") = {
+ val files = createTemplates("Trac4374.scala")
+ files("WithPrivate.html") match {
+ case node: scala.xml.Node => {
+ val s = node.toString
+ ! s.contains("""go to: <a href="WithPrivate$.html">companion</a>""") &&
+ files.get("WithPrivate$.html") == None
+ }
+ case _ => false
+ }
+ }
}