返回 last30days-skill
test_claude_code_list_free_report.py
根目录 / tests / test_claude_code_list_free_report.py
1 """Claude Code reports avoid markdown lists so streamed links stay clickable.
2
3 While a markdown list streams, Claude Code can redraw every link in the reply
4 as ``label (url)``. In live terminal trials the list format did this in 2 of 9
5 runs and the list-free format in 0 of 15. These pin the instruction only.
6 """
7
8 from tests.skill_contract import reference_text
9
10 MARKER = "**NO MARKDOWN LISTS ON CLAUDE CODE.**"
11
12
13 def test_rule_is_scoped_to_claude_code_and_names_both_replacements():
14 rule = reference_text("synthesis").split(MARKER, 1)[1].split("\n\n", 1)[0]
15 assert "`CLAUDECODE`" in rule
16 assert "`1\\.`" in rule
17 assert "`• `" in rule
18 assert "Other hosts keep normal lists" in rule
19
20
21 def test_comparison_template_applies_the_rule():
22 text = reference_text("comparison")
23 assert "NO MARKDOWN LISTS applies here too" in text
24
25
26 def test_rule_defers_to_the_checklist_and_keeps_lines_tight_without_it():
27 rule = reference_text("synthesis").split(MARKER, 1)[1].split("\n\n", 1)[0]
28 # Apps that render markdown get real lists through the checklist's list line.
29 assert "checklist's list line decides the format" in rule
30 # With the checklist off, the terminal format holds: hard breaks, no blank lines.
31 assert "each but the block's last ending in `\\`" in rule
32 assert "label line too" in rule and "no blank lines between" in rule
33
33 lines PYTHON