diff --git a/tests/test_jointer.py b/tests/test_jointer.py index b6f47ad..b05f17e 100644 --- a/tests/test_jointer.py +++ b/tests/test_jointer.py @@ -450,6 +450,13 @@ def test_multiple_formulas(self): def test_empty_string(self): """测试空字符串""" result = _parse_block_content("") + self.assertIsInstance(result, list) + self.assertEqual(len(result), 0) + + def test_none_input(self): + """测试 None 输入""" + result = _parse_block_content(None) + self.assertIsInstance(result, list) self.assertEqual(len(result), 0) def test_formula_only(self): diff --git a/tests/test_parser.py b/tests/test_parser.py index 2c7774f..43ad6c9 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -424,6 +424,23 @@ def test_nested_same_tags(self): self.assertEqual(inner_div.definition.name, "div") self.assertEqual(inner_div.children, ["Inner"]) + def test_empty_input(self): + """测试空字符串输入""" + result = parse_raw_markdown("") + self.assertIsInstance(result, list) + self.assertEqual(len(result), 0) + + def test_single_quoted_attributes(self): + """测试单引号属性值""" + result = parse_raw_markdown("