github.phpd.cn/goreleaser/goreleaser@v0.92.0/internal/pipe/pipe_test.go (about) 1 package pipe 2 3 import ( 4 "errors" 5 "testing" 6 7 "github.com/stretchr/testify/assert" 8 ) 9 10 func TestSkipPipe(t *testing.T) { 11 var reason = "this is a test" 12 var err = Skip(reason) 13 assert.Error(t, err) 14 assert.Equal(t, reason, err.Error()) 15 } 16 17 func TestIsSkip(t *testing.T) { 18 assert.True(t, IsSkip(Skip("whatever"))) 19 assert.False(t, IsSkip(errors.New("nope"))) 20 }