Skip to content

Fix spurious unit test failure on Windows machines #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/command/check-registry/check-registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestRegistryValidation(t *testing.T) {
}
tests := []testcase{
{"EmptyArg", "", "registry data file argument testdata is a folder, not a file"},
{"NonExistentFile", "nonexistent.txt", "while loading registry data file: stat testdata/nonexistent.txt: no such file or directory"},
{"NonExistentFile", "nonexistent.txt", "while loading registry data file:"},
{"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"},
{"InvalidUrlFormat", "invalid-url-format.txt", "while filtering registry data file: Following URL are unknown or unsupported git repos:\nhttps://github.com/arduino-libraries/SD"},
{"MissingType", "no-type.txt", "invalid type '' used by library 'SD'"},
Expand All @@ -53,7 +53,7 @@ func TestRegistryValidation(t *testing.T) {
if test.ExpectedResult == "" {
require.NoError(t, err)
} else {
require.EqualError(t, err, test.ExpectedResult)
require.ErrorContains(t, err, test.ExpectedResult)
}
})
}
Expand Down
Loading