MCPcopy Index your code
hub / github.com/codehamr/codehamr / TestBashExactExitMarkerFormat

Function TestBashExactExitMarkerFormat

internal/tools/bash_test.go:33–39  ·  view source on GitHub ↗

TestBashExactExitMarkerFormat pins the exact non-zero-exit shape: output, then a single "\n(exit: ...)" marker. The model parses these, and the other tests only Contains("exit"); a dropped "\n" or doubled marker would pass silently. Also proves real output survives alongside the exit (the `false` te

(t *testing.T)

Source from the content-addressed store, hash-verified

31// silently. Also proves real output survives alongside the exit (the `false`
32// test emits nothing).
33func TestBashExactExitMarkerFormat(t *testing.T) {
34 out := Bash(context.Background(), "echo out; exit 3", 5*time.Second)
35 want := "out\n\n(exit: exit status 3)"
36 if out != want {
37 t.Fatalf("exit marker format wrong:\n got %q\nwant %q", out, want)
38 }
39}
40
41func TestBashEmptyCommand(t *testing.T) {
42 if Bash(context.Background(), " ", time.Second) != "(empty command)" {

Callers

nothing calls this directly

Calls 1

BashFunction · 0.85

Tested by

no test coverage detected