MCPcopy Create free account
hub / github.com/docopt/docopt.go / TestLanguageErrors

Function TestLanguageErrors

docopt_test.go:1182–1191  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1180}
1181
1182func TestLanguageErrors(t *testing.T) {
1183 _, err := Parse("no usage with colon here", []string{}, true, "", false, false)
1184 if _, ok := err.(*LanguageError); !ok {
1185 t.Error(err)
1186 }
1187 _, err = Parse("usage: here \n\n and again usage: here", []string{}, true, "", false, false)
1188 if _, ok := err.(*LanguageError); !ok {
1189 t.Error(err)
1190 }
1191}
1192
1193func TestIssue40(t *testing.T) {
1194 _, output, err := parseOutput("usage: prog --help-commands | --help", []string{"--help"}, true, "", false)

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected