mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-22 04:08:49 +02:00
21 lines
342 B
Go
21 lines
342 B
Go
|
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)
|
||
|
}
|