prompt/prompt-xml/src/commonTest/kotlin/ai/koog/prompt/xml/XmlTest.kt [99:119]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fun testMixedContent() {
val result = xml {
tag("mixed") {
+("Text before")
tag("child") {
text("Child content")
}
+("Text after")
}
}
val expected = """
Text before
Child content
Text after
""".trimIndent()
assertEquals(expected, result)
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
prompt/prompt-xml/src/commonTest/kotlin/ai/koog/prompt/xml/XmlIndentationTest.kt [37:57]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fun testMixedContentIndentation() {
val result = xml {
tag("root") {
+("Text before")
tag("child") {
text("Child content")
}
+("Text after")
}
}
val expected = """
Text before
Child content
Text after
""".trimIndent()
assertEquals(expected, result)
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -