"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/fileutils/fileutils_test.go" between
moby-20.10.7.tar.gz and moby-20.10.8.tar.gz

About: Moby is a framework to assemble specialized container systems (formerly project name Docker; see here to clarify the relationship between the projects).

fileutils_test.go  (moby-20.10.7):fileutils_test.go  (moby-20.10.8)
skipping to change at line 380 skipping to change at line 380
{"abc/**", "abc", false}, {"abc/**", "abc", false},
{"abc/**", "abc/def", true}, {"abc/**", "abc/def", true},
{"abc/**", "abc/def/ghi", true}, {"abc/**", "abc/def/ghi", true},
{"**/.foo", ".foo", true}, {"**/.foo", ".foo", true},
{"**/.foo", "bar.foo", false}, {"**/.foo", "bar.foo", false},
} }
if runtime.GOOS != "windows" { if runtime.GOOS != "windows" {
tests = append(tests, []matchesTestCase{ tests = append(tests, []matchesTestCase{
{"a\\*b", "a*b", true}, {"a\\*b", "a*b", true},
{"a\\", "a", false},
{"a\\", "a\\", false},
}...) }...)
} }
for _, test := range tests { for _, test := range tests {
desc := fmt.Sprintf("pattern=%q text=%q", test.pattern, test.text ) desc := fmt.Sprintf("pattern=%q text=%q", test.pattern, test.text )
pm, err := NewPatternMatcher([]string{test.pattern}) pm, err := NewPatternMatcher([]string{test.pattern})
assert.NilError(t, err, desc) assert.NilError(t, err, desc)
res, _ := pm.Matches(test.text) res, _ := pm.Matches(test.text)
assert.Check(t, is.Equal(test.pass, res), desc) assert.Check(t, is.Equal(test.pass, res), desc)
} }
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)