diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-06-23 10:00:28 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-06-23 10:00:28 +0200 |
commit | 1c0b48da8dfa124eb762620c8cb803a9079b7c81 (patch) | |
tree | 6b4c161d8fdc70d301cb3d823b9e12f2a50aed2c /test/scaladoc | |
parent | b664a488acca9d89c600f5b87ba9a9ca77aace59 (diff) | |
parent | 2238a85d732dbfd63cfd9910511aa140838933f7 (diff) | |
download | scala-1c0b48da8dfa124eb762620c8cb803a9079b7c81.tar.gz scala-1c0b48da8dfa124eb762620c8cb803a9079b7c81.tar.bz2 scala-1c0b48da8dfa124eb762620c8cb803a9079b7c81.zip |
Merge pull request #3824 from retronym/ticket/8672
SI-8672 Better end-of-sentence detection for Scaladoc
Diffstat (limited to 'test/scaladoc')
-rw-r--r-- | test/scaladoc/run/t8672.check | 4 | ||||
-rw-r--r-- | test/scaladoc/run/t8672.scala | 32 |
2 files changed, 36 insertions, 0 deletions
diff --git a/test/scaladoc/run/t8672.check b/test/scaladoc/run/t8672.check new file mode 100644 index 0000000000..d7194c73bf --- /dev/null +++ b/test/scaladoc/run/t8672.check @@ -0,0 +1,4 @@ +Some(Chain(List(Text(New in release 1.2.3.4, it works), Text(.)))) +Some(Text(Sentence no period)) +Some(Chain(List(Text(Sentence period at end), Text(.)))) +Done. diff --git a/test/scaladoc/run/t8672.scala b/test/scaladoc/run/t8672.scala new file mode 100644 index 0000000000..8a9b5086bd --- /dev/null +++ b/test/scaladoc/run/t8672.scala @@ -0,0 +1,32 @@ +import scala.tools.nsc.doc.model._ +import scala.tools.partest.ScaladocModelTest + +object Test extends ScaladocModelTest { + override def code = """ + class C { + + /** + * New in release 1.2.3.4, it works. Next sentence. + * Next Line. + */ + def method1 = 0 + + /** Sentence no period */ + def method2 = 0 + + /** Sentence period at end.*/ + def method3 = 0 + } + """ + + def scaladocSettings = "" + + def testModel(root: Package) = { + import access._ + val ms = List("method1", "method2", "method3") + for (m <- ms) { + val method = root._class("C")._method(m) + println(method.comment.get.body.summary) + } + } +} |