MCPcopy Index your code
hub / github.com/docker-exec/dexec / TestBuildArgs

Function TestBuildArgs

cli/cli_test.go:271–287  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

269}
270
271func TestBuildArgs(t *testing.T) {
272 cases := []struct {
273 osArgs []string
274 want []string
275 }{
276 {
277 []string{"filename", "-b", "foo", "--build-arg", "bar", "--build-arg=foobar"},
278 []string{"foo", "bar", "foobar"},
279 },
280 }
281 for _, c := range cases {
282 got := ParseOsArgs(c.osArgs)
283 if !reflect.DeepEqual(got.Options[BuildArg], c.want) {
284 t.Errorf("ParseOsArgs %q != %q", got.Options[BuildArg], c.want)
285 }
286 }
287}
288
289func TestOrdering(t *testing.T) {
290 cases := []struct {

Callers

nothing calls this directly

Calls 1

ParseOsArgsFunction · 0.85

Tested by

no test coverage detected