MCPcopy
hub / github.com/rclone/rclone / checkListing

Function checkListing

vfs/dir_test.go:243–251  ·  view source on GitHub ↗

This lists dir and checks the listing is as expected

(t *testing.T, dir *Dir, want []string)

Source from the content-addressed store, hash-verified

241
242// This lists dir and checks the listing is as expected
243func checkListing(t *testing.T, dir *Dir, want []string) {
244 var got []string
245 nodes, err := dir.ReadDirAll()
246 require.NoError(t, err)
247 for _, node := range nodes {
248 got = append(got, fmt.Sprintf("%s,%d,%v", node.Name(), node.Size(), node.IsDir()))
249 }
250 assert.Equal(t, want, got)
251}
252
253func TestDirReadDirAll(t *testing.T) {
254 r, vfs := newTestVFS(t)

Callers 14

TestDirReadDirAllFunction · 0.70
TestDirMkdirFunction · 0.70
TestDirMkdirSubFunction · 0.70
TestDirRemoveFunction · 0.70
TestDirRemoveAllFunction · 0.70
TestDirRemoveNameFunction · 0.70
TestDirRenameFunction · 0.70
TestDirMetadataExtensionFunction · 0.70
TestRWFileHandleWriteAtFunction · 0.70

Calls 5

NameMethod · 0.65
SizeMethod · 0.65
ReadDirAllMethod · 0.45
IsDirMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…