diff options
Diffstat (limited to 'plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt')
-rw-r--r-- | plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt b/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt index 4f37923b..af8dbb94 100644 --- a/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt +++ b/plugins/base/src/test/kotlin/parsers/JavadocParserTest.kt @@ -396,4 +396,36 @@ class JavadocParserTest : BaseAbstractTest() { } } } + + @Test + fun `var tag is handled properly`() { + val source = """ + |/src/main/kotlin/test/Test.java + |package example + | + | /** + | * An example of using var tag: <var>variable</var> + | */ + | public class Test {} + """.trimIndent() + testInline( + source, + configuration, + ) { + documentablesCreationStage = { modules -> + val docs = modules.first().packages.first().classlikes.single().documentation.first().value + val root = docs.children.first().root + + kotlin.test.assertEquals( + listOf( + P(children = listOf( + Text("An example of using var tag: "), + Var(children = listOf(Text("variable"))), + )), + ), + root.children + ) + } + } + } } |