1
mirror of https://github.com/rclone/rclone synced 2024-12-24 15:43:45 +01:00

fstest: add test for reading object in a case insensitive way #4830

This commit is contained in:
Nick Craig-Wood 2020-12-07 10:57:06 +00:00
parent 56ad6aac4d
commit b81b6da3fc

View File

@ -999,6 +999,16 @@ func Run(t *testing.T, opt *Opt) {
file1.Check(t, obj, f.Precision()) file1.Check(t, obj, f.Precision())
}) })
// FsNewObjectCaseInsensitive tests NewObject on a case insensitive file system
t.Run("FsNewObjectCaseInsensitive", func(t *testing.T) {
skipIfNotOk(t)
if !f.Features().CaseInsensitive {
t.Skip("Not Case Insensitive")
}
obj := findObject(ctx, t, f, strings.ToUpper(file1.Path))
file1.Check(t, obj, f.Precision())
})
// TestFsListFile1and2 tests two files present // TestFsListFile1and2 tests two files present
t.Run("FsListFile1and2", func(t *testing.T) { t.Run("FsListFile1and2", func(t *testing.T) {
skipIfNotOk(t) skipIfNotOk(t)