From d4196fda16afa672612e70b38a019ecfabb4976d Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 23 Nov 2024 20:21:40 +0800 Subject: [PATCH] :white_check_mark: Add testcases https://github.com/siyuan-note/siyuan/issues/13240 --- test/h2m_test.go | 1 + test/m2p_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/test/h2m_test.go b/test/h2m_test.go index 056454d57f..a3b06f1ca2 100644 --- a/test/h2m_test.go +++ b/test/h2m_test.go @@ -18,6 +18,7 @@ import ( var html2MdTests = []parseTest{ + {"202", "
foobarbazbazz
", "foobar**baz**bazz\n"}, {"201", "", "![动图](https://pica.zhimg.com/v2-454df793026c3018d1f047d9bbf2aefe_b.webp)\n"}, {"200", "复制代码 隐藏代码", "```\npublic Object Index(Object functionObject, Object newTarget, Index this, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {\n if ((0 == arg3 ? 1 : 0) != 0) {\n arg3 = -1;\n }\n if ((0 == arg4 ? 1 : 0) != 0) {\n arg4 = null;\n }\n Object obj = super(arg0, arg2, arg3, arg5);\n if ((\"function\" == typeof(arg4) ? 1 : 0) != 0) {\n obj.paramsGenerator_ = arg4;\n }\n obj.__userInput = ObservedPropertySimplePU(\"\", obj, \"userInput\");\n obj.secretKey = \"[f#fLw)??Pz?#9w)Du[ks[q[#w4D?4P4UJf,kU[f.rDkfwrDtq...)?J.#rP4[qrPDJkkJ|.9J|qffU?k|D4P4P[wkk.)k?JUJ[k#9kww[r??wUfw|PkrPUf.P#f.P#.PwJ4f4q.PU4UPDr9.[9fJ#PqP)cDDffJPDrJ.J4qPP[r[.JfJ4f|?U9#\";\n obj.setInitiallyProvidedValue(arg1);\n obj.finalizeConstruction();\n return obj;\n }\n```\n"}, diff --git a/test/m2p_test.go b/test/m2p_test.go index aa1212a055..eaea73df25 100644 --- a/test/m2p_test.go +++ b/test/m2p_test.go @@ -19,6 +19,7 @@ import ( var md2BlockDOMTests = []parseTest{ + {"94", "foobar**baz**bazz\\n", "public Object Index(Object functionObject, Object newTarget, Index this, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
if ((0 == arg3 ? 1 : 0) != 0) {
arg3 = -1;
}
if ((0 == arg4 ? 1 : 0) != 0) {
arg4 = null;
}
Object obj = super(arg0, arg2, arg3, arg5);
if ((\"function\" == typeof(arg4) ? 1 : 0) != 0) {
obj.paramsGenerator_ = arg4;
}
obj.__userInput = ObservedPropertySimplePU(\"\", obj, \"userInput\");
obj.secretKey = \"[f#fLw)??Pz?#9w)Du[ks[q[#w4D?4P4UJf,kU[f.rDkfwrDtq...)?J.#rP4[qrPDJkkJ|.9J|qffU?k|D4P4P[wkk.)k?JUJ[k#9kww[r??wUfw|PkrPUf.P#f.P#.PwJ4f4q.PU4UPDr9.[9fJ#PqP)cDDffJPDrJ.J4qPP[r[.JfJ4f|?U9#\";
obj.setInitiallyProvidedValue(arg1);
obj.finalizeConstruction();
return obj;
}
foo |
---|
bar baz |