pkg/fileutils: TestMatches: remove cases no longer valid for go1.16

These tests were no longer valid on Go 1.16; related to https://tip.golang.org/doc/go1.16#path/filepath

> The Match and Glob functions now return an error if the unmatched part of
> the pattern has a syntax error. Previously, the functions returned early on
> a failed match, and thus did not report any later syntax error in the pattern.

Causing the test to fail:

    === RUN   TestMatches
        fileutils_test.go:388: assertion failed: error is not nil: syntax error in pattern: pattern="a\\" text="a"
    --- FAIL: TestMatches (0.00s)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-05-17 13:37:02 +02:00
parent 0f124aba2e
commit 2842639e0e
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 0 additions and 2 deletions

View File

@ -377,8 +377,6 @@ func TestMatches(t *testing.T) {
if runtime.GOOS != "windows" {
tests = append(tests, []matchesTestCase{
{"a\\*b", "a*b", true},
{"a\\", "a", false},
{"a\\", "a\\", false},
}...)
}