From 66695a04740b792aadefb871758efd512e770849 Mon Sep 17 00:00:00 2001 From: Ray Miller Date: Wed, 10 May 2023 17:04:02 +0100 Subject: [PATCH] Return immediately from test if error is encountered --- main_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main_test.go b/main_test.go index f4f2690..762ff4a 100644 --- a/main_test.go +++ b/main_test.go @@ -77,6 +77,7 @@ func TestParseConfig(t *testing.T) { } else { if err != nil { t.Errorf("got unexpected error: %v", err) + return } if res.versionPrefix != tc.expect.versionPrefix { t.Errorf("got versionPrefix %s, expected %s", res.versionPrefix, tc.expect.versionPrefix)