photoprism/pkg/fs/case_test.go

27 lines
466 B
Go
Raw Normal View History

package fs
import (
"os"
"testing"
"github.com/stretchr/testify/assert"
)
func TestCaseInsensitive(t *testing.T) {
t.Run("temp", func(t *testing.T) {
if result, err := CaseInsensitive(os.TempDir()); err != nil {
t.Fatal(err)
} else {
t.Logf("tmp fs case-insensitive: %t", result)
}
})
}
2021-03-03 15:41:32 +01:00
func TestIgnoreCase(t *testing.T) {
assert.False(t, ignoreCase)
IgnoreCase()
assert.True(t, ignoreCase)
ignoreCase = false
assert.False(t, ignoreCase)
}