Skip to content

Commit f2798dc

Browse files
authored
Merge pull request #335 from per1234/unit-test-windows-compatibility
Fix spurious unit test failure on Windows machines
2 parents 22d4c14 + 6b004d9 commit f2798dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/command/check-registry/check-registry_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestRegistryValidation(t *testing.T) {
3838
}
3939
tests := []testcase{
4040
{"EmptyArg", "", "registry data file argument testdata is a folder, not a file"},
41-
{"NonExistentFile", "nonexistent.txt", "while loading registry data file: stat testdata/nonexistent.txt: no such file or directory"},
41+
{"NonExistentFile", "nonexistent.txt", "while loading registry data file:"},
4242
{"InvalidDataFormat", "invalid-data-format.txt", "while loading registry data file: invalid line format (3 fields are required): https://github.com/arduino-libraries/SD.git|Partner;SD"},
4343
{"InvalidUrlFormat", "invalid-url-format.txt", "while filtering registry data file: Following URL are unknown or unsupported git repos:\nhttps://github.com/arduino-libraries/SD"},
4444
{"MissingType", "no-type.txt", "invalid type '' used by library 'SD'"},
@@ -53,7 +53,7 @@ func TestRegistryValidation(t *testing.T) {
5353
if test.ExpectedResult == "" {
5454
require.NoError(t, err)
5555
} else {
56-
require.EqualError(t, err, test.ExpectedResult)
56+
require.ErrorContains(t, err, test.ExpectedResult)
5757
}
5858
})
5959
}

0 commit comments

Comments
 (0)