MCPcopy
hub / github.com/bitfield/script / TestSetError_SetsSuppliedErrorOnPipe

Function TestSetError_SetsSuppliedErrorOnPipe

script_test.go:1871–1879  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1869}
1870
1871func TestSetError_SetsSuppliedErrorOnPipe(t *testing.T) {
1872 t.Parallel()
1873 p := script.NewPipe()
1874 e := errors.New("fake error")
1875 p.SetError(e)
1876 if p.Error() != e {
1877 t.Errorf("want %v when setting pipe error, got %v", e, p.Error())
1878 }
1879}
1880
1881func TestExitStatus_CorrectlyParsesExitStatusValueFromErrorMessage(t *testing.T) {
1882 t.Parallel()

Callers

nothing calls this directly

Calls 3

SetErrorMethod · 0.95
ErrorMethod · 0.95
NewPipeFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…