(t *testing.T)
| 21 | } |
| 22 | |
| 23 | func TestNewDirWalkerForFile(t *testing.T) { |
| 24 | for desc, c := range map[string]*newDirWalkerForFileTestCase{ |
| 25 | "filename only": {"foo.bin", ""}, |
| 26 | "path with one dir": {"abc/foo.bin", "abc"}, |
| 27 | "path with two dirs": {"abc/def/foo.bin", "abc/def"}, |
| 28 | "path with leading slash": {"/foo.bin", ""}, |
| 29 | "path with trailing slash": {"abc/", "abc"}, |
| 30 | "bare slash": {"/", ""}, |
| 31 | "empty path": {"", ""}, |
| 32 | } { |
| 33 | t.Run(desc, c.Assert) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | type dirWalkerTestConfig struct{} |
| 38 |