summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/binary/binary_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/binary/binary_test.go b/pkg/binary/binary_test.go
index d8d481f32..200961c70 100644
--- a/pkg/binary/binary_test.go
+++ b/pkg/binary/binary_test.go
@@ -21,6 +21,7 @@ import (
"fmt"
"io"
"reflect"
+ "strings"
"testing"
)
@@ -55,8 +56,8 @@ func TestPanic(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
defer func() {
r := recover()
- if got := fmt.Sprint(r); got != test.want {
- t.Errorf("Got recover() = %q, want = %q", got, test.want)
+ if got := fmt.Sprint(r); !strings.HasPrefix(got, test.want) {
+ t.Errorf("Got recover() = %q, want prefix = %q", got, test.want)
}
}()