2019-05-06 23:18:10 +02:00
|
|
|
package util
|
2019-05-03 18:57:28 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestExists(t *testing.T) {
|
2019-05-04 05:25:00 +02:00
|
|
|
assert.True(t, Exists("./testdata/test.jpg"))
|
2019-05-03 18:57:28 +02:00
|
|
|
assert.False(t, Exists("./foo.jpg"))
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestExpandedFilename(t *testing.T) {
|
2019-05-04 05:25:00 +02:00
|
|
|
filename := ExpandedFilename("./testdata/test.jpg")
|
2019-05-03 18:57:28 +02:00
|
|
|
|
|
|
|
assert.IsType(t, "", filename)
|
|
|
|
|
|
|
|
t.Logf("ExpandedFilename: %s", filename)
|
|
|
|
}
|