MCPcopy Create free account
hub / github.com/diillson/chatcli / TestSplitTopLevelCodeBlocks_TildeFence

Function TestSplitTopLevelCodeBlocks_TildeFence

cli/cli_rendering_test.go:55–61  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestSplitTopLevelCodeBlocks_TildeFence(t *testing.T) {
56 in := "~~~json\n{\"a\":1}\n~~~"
57 segs := splitTopLevelCodeBlocks(in)
58 require.Len(t, segs, 1)
59 assert.True(t, segs[0].isCode)
60 assert.Equal(t, "json", segs[0].lang)
61}
62
63func TestCodeLanguageChip_DegradesWithoutColor(t *testing.T) {
64 // On a no-color profile the chip is plain text (no escapes), so piped

Callers

nothing calls this directly

Calls 3

splitTopLevelCodeBlocksFunction · 0.85
EqualMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected