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

Function TestSources

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

Source from the content-addressed store, hash-verified

175}
176
177func TestSources(t *testing.T) {
178 cases := []struct {
179 osArgs []string
180 want []string
181 }{
182 {
183 []string{"filename", "foo.cpp", "bar.java", "foo.bar.scala", "bar-foo.groovy"},
184 []string{"foo.cpp", "bar.java", "foo.bar.scala", "bar-foo.groovy"},
185 },
186 {
187 []string{"filename", "a.cpp"},
188 []string{"a.cpp"},
189 },
190 }
191 for _, c := range cases {
192 got := ParseOsArgs(c.osArgs)
193 if !reflect.DeepEqual(got.Options[Source], c.want) {
194 t.Errorf("ParseOsArgs %q != %q", got.Options[Source], c.want)
195 }
196 }
197}
198
199func TestImage(t *testing.T) {
200 cases := []struct {

Callers

nothing calls this directly

Calls 1

ParseOsArgsFunction · 0.85

Tested by

no test coverage detected