1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-22 04:08:49 +02:00
goreleaser/internal/testlib/mktemp_test.go

21 lines
342 B
Go
Raw Normal View History

2017-07-23 16:27:46 -03:00
package testlib
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestMkTemp(t *testing.T) {
var assert = assert.New(t)
current, err := os.Getwd()
assert.NoError(err)
folder, back := Mktmp(t)
assert.NotEmpty(folder)
back()
newCurrent, err := os.Getwd()
assert.NoError(err)
assert.Equal(current, newCurrent)
}