MCPcopy
hub / github.com/urfave/cli / TestSuggestFlagFromErrorWrongCommand

Function TestSuggestFlagFromErrorWrongCommand

suggestions_test.go:103–115  ·  suggestions_test.go::TestSuggestFlagFromErrorWrongCommand
(t *testing.T)

Source from the content-addressed store, hash-verified

101}
102
103func TestSuggestFlagFromErrorWrongCommand(t *testing.T) {
104 // Given
105 app := buildExtendedTestCommand()
106
107 // When
108 _, err := app.suggestFlagFromError(
109 errors.New(providedButNotDefinedErrMsg+"flag"),
110 "invalid",
111 )
112
113 // Then
114 assert.Error(t, err)
115}
116
117func TestSuggestFlagFromErrorNoSuggestion(t *testing.T) {
118 // Given

Callers

nothing calls this directly

Calls 3

buildExtendedTestCommandFunction · 0.85
suggestFlagFromErrorMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected