diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2017-03-04 09:43:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-04 09:43:56 +0100 |
commit | d1d700e15cd38ac42462e099b0e0f33e280bbbe0 (patch) | |
tree | 724a05f584c3d738536728c6cab2054ac49278fe /test | |
parent | f77139532d5b6030eaa69a6ff9ed07e7ea4a4dfe (diff) | |
parent | cf64718c97ec2b2d31d137c0372eb1c00e6638d6 (diff) | |
download | scala-d1d700e15cd38ac42462e099b0e0f33e280bbbe0.tar.gz scala-d1d700e15cd38ac42462e099b0e0f33e280bbbe0.tar.bz2 scala-d1d700e15cd38ac42462e099b0e0f33e280bbbe0.zip |
Merge pull request #5754 from Philippus/issue/html-tag-in-hover
fix regression in scaladoc
Diffstat (limited to 'test')
-rw-r--r-- | test/scaladoc/run/inlineToStr-strips-unwanted-text.check | 12 | ||||
-rw-r--r-- | test/scaladoc/run/inlineToStr-strips-unwanted-text.scala | 41 |
2 files changed, 24 insertions, 29 deletions
diff --git a/test/scaladoc/run/inlineToStr-strips-unwanted-text.check b/test/scaladoc/run/inlineToStr-strips-unwanted-text.check index 986b58d469..619c56180b 100644 --- a/test/scaladoc/run/inlineToStr-strips-unwanted-text.check +++ b/test/scaladoc/run/inlineToStr-strips-unwanted-text.check @@ -1,13 +1 @@ -Chain(List(Chain(List(Text(This comment contains ), Superscript(Text(superscript)))))) -Chain(List(Chain(List(Text(This comment contains ), Subscript(Text(subscript)))))) -Chain(List(Chain(List(Text(This comment contains a link ), Link(https://scala.epfl.ch/,Text(https://scala.epfl.ch/)))))) -Chain(List(Chain(List(Text(This comment contains an ), HtmlTag(<strong>html tag</strong>))))) -Chain(List(Chain(List(Text(This comment contains a), HtmlTag(<br>), Text( single html tag))))) -Chain(List(Chain(List(Text(This comment contains nested ), HtmlTag(<strong>html<br> tags</strong>))))) -This comment contains superscript -This comment contains subscript -This comment contains a link https://scala.epfl.ch/ -This comment contains an html tag -This comment contains a single html tag -This comment contains nested html tags Done. diff --git a/test/scaladoc/run/inlineToStr-strips-unwanted-text.scala b/test/scaladoc/run/inlineToStr-strips-unwanted-text.scala index f51b7d6b3f..8faaf1b93d 100644 --- a/test/scaladoc/run/inlineToStr-strips-unwanted-text.scala +++ b/test/scaladoc/run/inlineToStr-strips-unwanted-text.scala @@ -21,6 +21,9 @@ object Test extends ScaladocModelTest { /** This comment contains nested <strong>html<br> tags</strong> */ def quuz = ??? + + /** This comment contains a [[corge ,,link with a subscript title,,]] */ + def corge = ??? } """ def scaladocSettings = "" @@ -30,22 +33,26 @@ object Test extends ScaladocModelTest { import access._ val foo = root._class("Foo") - val bar = foo._method("bar") - val baz = foo._method("baz") - val qux = foo._method("qux") - val quux = foo._method("quux") - val quuz = foo._method("quuz") - println(foo.comment.get.short) - println(bar.comment.get.short) - println(baz.comment.get.short) - println(qux.comment.get.short) - println(quux.comment.get.short) - println(quuz.comment.get.short) - println(Page.inlineToStr(foo.comment.get.short)) - println(Page.inlineToStr(bar.comment.get.short)) - println(Page.inlineToStr(baz.comment.get.short)) - println(Page.inlineToStr(qux.comment.get.short)) - println(Page.inlineToStr(quux.comment.get.short)) - println(Page.inlineToStr(quuz.comment.get.short)) + + val fooStr = Page.inlineToStr(foo.comment.get.short) + assert(fooStr == "This comment contains superscript", fooStr) + + val barStr = Page.inlineToStr(foo._method("bar").comment.get.short) + assert(barStr == "This comment contains subscript", barStr) + + val bazStr = Page.inlineToStr(foo._method("baz").comment.get.short) + assert(bazStr == "This comment contains a link https://scala.epfl.ch/", bazStr) + + val quxStr = Page.inlineToStr(foo._method("qux").comment.get.short) + assert(quxStr == "This comment contains an html tag", quxStr) + + val quuxStr = Page.inlineToStr(foo._method("quux").comment.get.short) + assert(quuxStr == "This comment contains a single html tag", quuxStr) + + val quuzStr = Page.inlineToStr(foo._method("quuz").comment.get.short) + assert(quuzStr == "This comment contains nested html tags", quuzStr) + + val corgeStr = Page.inlineToStr(foo._method("corge").comment.get.short) + assert(corgeStr == "This comment contains a link with a subscript title", corgeStr) } } |