MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestHeadTailBufferSmallOutputUntouched

Function TestHeadTailBufferSmallOutputUntouched

internal/tools/bash_test.go:74–81  ·  view source on GitHub ↗

TestHeadTailBufferSmallOutputUntouched: output under the head cap must come back byte-identical - the bounding must be invisible in the normal case.

(t *testing.T)

Source from the content-addressed store, hash-verified

72
73// TestHeadTailBufferSmallOutputUntouched: output under the head cap must come
74// back byte-identical - the bounding must be invisible in the normal case.
75func TestHeadTailBufferSmallOutputUntouched(t *testing.T) {
76 var b headTailBuffer
77 b.Write([]byte("hello "))
78 b.Write([]byte("world"))
79 if got := b.String(); got != "hello world" {
80 t.Fatalf("small output mangled: %q", got)
81 }
82}
83
84// TestHeadTailBufferKeepsExactHeadAndTail: once the middle is dropped, the

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.95
StringMethod · 0.95

Tested by

no test coverage detected