diff options
Diffstat (limited to 'modules/util/shellquote_test.go')
-rw-r--r-- | modules/util/shellquote_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/util/shellquote_test.go b/modules/util/shellquote_test.go index 969998c592..4ef5ce6980 100644 --- a/modules/util/shellquote_test.go +++ b/modules/util/shellquote_test.go @@ -3,7 +3,11 @@ package util -import "testing" +import ( + "testing" + + "github.com/stretchr/testify/assert" +) func TestShellEscape(t *testing.T) { tests := []struct { @@ -83,9 +87,7 @@ func TestShellEscape(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := ShellEscape(tt.toEscape); got != tt.want { - t.Errorf("ShellEscape(%q):\nGot: %s\nWanted: %s", tt.toEscape, got, tt.want) - } + assert.Equal(t, tt.want, ShellEscape(tt.toEscape)) }) } } |