diff options
Diffstat (limited to 'test/scaladoc')
-rw-r--r-- | test/scaladoc/resources/Trac4372.scala | 5 | ||||
-rw-r--r-- | test/scaladoc/scala/html/HtmlFactoryTest.scala | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/scaladoc/resources/Trac4372.scala b/test/scaladoc/resources/Trac4372.scala new file mode 100644 index 0000000000..03da659eee --- /dev/null +++ b/test/scaladoc/resources/Trac4372.scala @@ -0,0 +1,5 @@ +class Trac4372 { + def method(n: Int) = n + def +:(n: Int) = n + val -: = 1 +} diff --git a/test/scaladoc/scala/html/HtmlFactoryTest.scala b/test/scaladoc/scala/html/HtmlFactoryTest.scala index 40d9c96f94..3240ab83a4 100644 --- a/test/scaladoc/scala/html/HtmlFactoryTest.scala +++ b/test/scaladoc/scala/html/HtmlFactoryTest.scala @@ -113,4 +113,16 @@ object Test extends Properties("HtmlFactory") { property("Trac #4180") = { createTemplates("Trac4180.scala")("Test.html") != None } + + property("Trac #4372") = { + createTemplates("Trac4372.scala")("Trac4372.html") match { + case node: scala.xml.Node => { + val html = node.toString + html.contains("<span class=\"name\">+:</span>\n") && + html.contains("<span class=\"name\">-:</span>\n") && + html.contains("""<span class="params">(<span name="n">n: <span name="scala.Int" class="extype">Int</span></span>)</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>""") + } + case _ => false + } + } } |