1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
goreleaser/internal/testlib/tmpl.go
Ville Skyttä ef690d07ef
style: spelling and grammar fixes (#4069)
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-05 13:08:57 -03:00

17 lines
405 B
Go

package testlib
import (
"testing"
"github.com/stretchr/testify/require"
)
// RequireTemplateError requires thqt an error happens and that it is a template error.
func RequireTemplateError(tb testing.TB, err error) {
tb.Helper()
require.Error(tb, err)
require.Contains(tb, err.Error(), "template:")
require.Regexp(tb, "bad character|map has no entry|unexpected \"}\" in operand", err.Error())
}