(t *testing.T)
| 474 | } |
| 475 | |
| 476 | func TestDirRemoveAll(t *testing.T) { |
| 477 | r, vfs, dir, _ := dirCreate(t) |
| 478 | |
| 479 | // Remove the directory and contents |
| 480 | err := dir.RemoveAll() |
| 481 | require.NoError(t, err) |
| 482 | |
| 483 | // check the vfs |
| 484 | root, err := vfs.Root() |
| 485 | require.NoError(t, err) |
| 486 | checkListing(t, root, []string(nil)) |
| 487 | |
| 488 | // check the underlying r.Fremote |
| 489 | fstest.CheckListingWithPrecision(t, r.Fremote, []fstest.Item{}, []string{}, r.Fremote.Precision()) |
| 490 | |
| 491 | // read only check |
| 492 | vfs.Opt.ReadOnly = true |
| 493 | err = dir.RemoveAll() |
| 494 | assert.Equal(t, EROFS, err) |
| 495 | } |
| 496 | |
| 497 | func TestDirRemoveName(t *testing.T) { |
| 498 | r, vfs, dir, _ := dirCreate(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…