This commit is contained in:
2025-08-27 19:58:13 +08:00
parent e5e25edf2d
commit 6a69a50230

View File

@@ -0,0 +1,36 @@
package com.agentsflex.core.test.util;
import com.agentsflex.core.chain.node.LlmNode;
import org.junit.Assert;
import org.junit.Test;
public class UnWrapMarkdownTest {
@Test
public void testUnWrapMarkdown01() {
String markdown = "```**Hello**, *world*!```";
String expected = "**Hello**, *world*!";
String actual = LlmNode.unWrapMarkdown(markdown);
System.out.println(actual);
Assert.assertEquals(expected, actual);
}
@Test
public void testUnWrapMarkdown02() {
String markdown = "```\n**Hello**, *world*!\n```";
String expected = "**Hello**, *world*!";
String actual = LlmNode.unWrapMarkdown(markdown);
System.out.println(actual);
Assert.assertEquals(expected, actual);
}
@Test
public void testUnWrapMarkdown03() {
String markdown = "```json\n**Hello**, *world*!\n```";
String expected = "**Hello**, *world*!";
String actual = LlmNode.unWrapMarkdown(markdown);
System.out.println(actual);
Assert.assertEquals(expected, actual);
}
}