1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-04-23 12:18:50 +02:00
goreleaser/pipeline/repos/repos_test.go
Jorin Vogel 22dd16df81 Fix parsing of repo options.
Before this it break when leaving, for example,
the `brew` section empty.
2017-01-19 09:05:20 +01:00

31 lines
453 B
Go

package repos
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSplit(t *testing.T) {
assert := assert.New(t)
a, b := split("a/b")
assert.Equal("a", a)
assert.Equal("b", b)
a, b = split("")
assert.Equal("", a)
assert.Equal("", b)
a, b = split("a")
assert.Equal("a", a)
assert.Equal("", b)
a, b = split("a/")
assert.Equal("a", a)
assert.Equal("", b)
a, b = split("/b")
assert.Equal("", a)
assert.Equal("b", b)
}