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

Function TestGet

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

Source from the content-addressed store, hash-verified

42}
43
44func TestGet(t *testing.T) {
45 cases := []struct {
46 opt OptionData
47 want WantedData
48 }{
49 {
50 OptionData{"foo.bar", ""},
51 WantedData{Source, "foo.bar", 1, ""},
52 },
53 {
54 OptionData{"-b", "foo"},
55 WantedData{BuildArg, "foo", 2, ""},
56 },
57 {
58 OptionData{"--build-arg", "foo"},
59 WantedData{BuildArg, "foo", 2, ""},
60 },
61 {
62 OptionData{"--build-arg=foo", ""},
63 WantedData{BuildArg, "foo", 1, ""},
64 },
65 {
66 OptionData{"-a", "foo"},
67 WantedData{Arg, "foo", 2, ""},
68 },
69 {
70 OptionData{"--arg", "foo"},
71 WantedData{Arg, "foo", 2, ""},
72 },
73 {
74 OptionData{"--arg=foo", ""},
75 WantedData{Arg, "foo", 1, ""},
76 },
77 {
78 OptionData{"-i", "foo"},
79 WantedData{Include, "foo", 2, ""},
80 },
81 {
82 OptionData{"--include", "foo"},
83 WantedData{Include, "foo", 2, ""},
84 },
85 {
86 OptionData{"--include=foo", ""},
87 WantedData{Include, "foo", 1, ""},
88 },
89 {
90 OptionData{"-m", "foo"},
91 WantedData{Image, "foo", 2, ""},
92 },
93 {
94 OptionData{"--image", "foo"},
95 WantedData{Image, "foo", 2, ""},
96 },
97 {
98 OptionData{"--image=foo", ""},
99 WantedData{Image, "foo", 1, ""},
100 },
101 {

Callers

nothing calls this directly

Calls 1

ArgToOptionFunction · 0.85

Tested by

no test coverage detected