MCPcopy
hub / github.com/lima-vm/lima / TestValidatePatternErrorMessage

Function TestValidatePatternErrorMessage

pkg/envutil/envutil_test.go:244–249  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

242}
243
244func TestValidatePatternErrorMessage(t *testing.T) {
245 err := validatePattern("FOO-BAR")
246 assert.Assert(t, err != nil, "Expected pattern with dash to be invalid")
247 expectedMsg := "pattern `FOO-BAR` contains invalid character `-` at position 3"
248 assert.Equal(t, err.Error(), expectedMsg)
249}

Callers

nothing calls this directly

Calls 2

validatePatternFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected