capture errors in scanner main
This commit is contained in:
@@ -25,9 +25,7 @@ func TestFirstExisting(t *testing.T) {
|
||||
"default"},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
tc := tc // capture range variable?
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
actu := firstExisting(tc.or, tc.values...)
|
||||
if actu != tc.exp {
|
||||
t.Errorf("expected %q, got %q", tc.exp, actu)
|
||||
|
||||
Reference in New Issue
Block a user