Skip to content

Commit b0cc99a

Browse files
committed
fix(parser): correct newline escaping in test cases
Update test cases in `CodeUtilTest.kt` to use proper newline characters (`\n`) instead of escaped versions (`\\n`) for markdown and HTTP request content parsing.
1 parent de1586b commit b0cc99a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/test/kotlin/cc/unitmesh/devti/parser/CodeUtilTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ class CodeUtilTest {
5555

5656
@Test
5757
fun should_handle_pure_markdown_content() {
58-
val content = "```markdown\\nGET /wp/v2/posts\\n```"
58+
val content = "```markdown\nGET /wp/v2/posts\n```"
5959
val code = Code.parse(content)
6060
assertEquals(code.text, "GET /wp/v2/posts")
6161
}
6262

6363
@Test
6464
fun should_handle_http_request() {
65-
val content = "```http request\\nGET /wp/v2/posts\\n```"
65+
val content = "```http request\nGET /wp/v2/posts\n```"
6666
val code = Code.parse(content)
6767
assertEquals(code.text, "GET /wp/v2/posts")
6868
}

0 commit comments

Comments
 (0)