2020-12-26 18:06:54 +01:00
|
|
|
package fs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
2021-04-19 13:48:46 +02:00
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
2020-12-26 18:06:54 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
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) {
|
2022-04-10 17:02:09 +02:00
|
|
|
isCS, err := CaseInsensitive(os.TempDir())
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
assert.Equal(t, isCS, ignoreCase)
|
2021-03-03 15:41:32 +01:00
|
|
|
IgnoreCase()
|
|
|
|
assert.True(t, ignoreCase)
|
|
|
|
ignoreCase = false
|
|
|
|
assert.False(t, ignoreCase)
|
|
|
|
}
|