mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
Add test for `xml code block scenario
- Add specific test case for `xml code blocks containing log_message directives - Test passes, confirming the implementation handles this scenario correctly in tests - However, runtime behavior still differs from test behavior
This commit is contained in:
parent
51440392be
commit
cc1a4df15c
1 changed files with 14 additions and 0 deletions
|
|
@ -123,4 +123,18 @@ suite("DirectiveStreamingParser", () => {
|
|||
expect(result[0].type).toBe("text")
|
||||
expect(result[1].type).toBe("log_message")
|
||||
})
|
||||
|
||||
test("should not parse directives inside ```xml code blocks", () => {
|
||||
const input =
|
||||
"Here's the basic format:\n\n```xml\n<log_message>\n<message>This is a debug message for detailed troubleshooting information</message>\n<level>debug</level>\n</log_message>\n```\n\nThat should be treated as code."
|
||||
const result = DirectiveStreamingParser.parse(input)
|
||||
expect(result).toEqual([
|
||||
{
|
||||
type: "text",
|
||||
content:
|
||||
"Here's the basic format:\n\n```xml\n<log_message>\n<message>This is a debug message for detailed troubleshooting information</message>\n<level>debug</level>\n</log_message>\n```\n\nThat should be treated as code.",
|
||||
partial: true,
|
||||
} as TextDirective,
|
||||
])
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue