This lists dir and checks the listing is as expected
(t *testing.T, dir *Dir, want []string)
| 241 | |
| 242 | // This lists dir and checks the listing is as expected |
| 243 | func 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 | |
| 253 | func TestDirReadDirAll(t *testing.T) { |
| 254 | r, vfs := newTestVFS(t) |
no test coverage detected
searching dependent graphs…