(t *testing.T)
| 82 | } |
| 83 | |
| 84 | func TestValidRecursiveDirectories(t *testing.T) { |
| 85 | t.Parallel() |
| 86 | |
| 87 | data := []struct { |
| 88 | pattern string |
| 89 | file string |
| 90 | }{ |
| 91 | {"/path", "/path/file.php"}, |
| 92 | {"/path", "/path/subpath/file.php"}, |
| 93 | {"/path/", "/path/subpath/file.php"}, |
| 94 | {"/path**", "/path/subpath/file.php"}, |
| 95 | {"/path/**", "/path/subpath/file.php"}, |
| 96 | {"/path/**/", "/path/subpath/file.php"}, |
| 97 | {".", relativeDir(t, "file.php")}, |
| 98 | {".", relativeDir(t, "subpath/file.php")}, |
| 99 | {"./**", relativeDir(t, "subpath/file.php")}, |
| 100 | {"..", relativeDir(t, "subpath/file.php")}, |
| 101 | } |
| 102 | |
| 103 | for _, d := range data { |
| 104 | t.Run(d.pattern, func(t *testing.T) { |
| 105 | t.Parallel() |
| 106 | |
| 107 | assertPatternMatch(t, d.pattern, d.file) |
| 108 | }) |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | func TestInvalidRecursiveDirectories(t *testing.T) { |
| 113 | t.Parallel() |
nothing calls this directly
no test coverage detected