(t *testing.T)
| 178 | } |
| 179 | |
| 180 | func TestValidRecursiveFilePatterns(t *testing.T) { |
| 181 | t.Parallel() |
| 182 | |
| 183 | data := []struct { |
| 184 | pattern string |
| 185 | dir string |
| 186 | }{ |
| 187 | {"/path/**/*.php", "/path/file.php"}, |
| 188 | {"/path/**/*.php", "/path/subpath/file.php"}, |
| 189 | {"/path/**/?ile.php", "/path/subpath/file.php"}, |
| 190 | {"/path/**/file.php", "/path/subpath/file.php"}, |
| 191 | {"**/*.php", relativeDir(t, "file.php")}, |
| 192 | {"**/*.php", relativeDir(t, "subpath/file.php")}, |
| 193 | {"./**/*.php", relativeDir(t, "subpath/file.php")}, |
| 194 | } |
| 195 | |
| 196 | for _, d := range data { |
| 197 | t.Run(d.pattern, func(t *testing.T) { |
| 198 | t.Parallel() |
| 199 | |
| 200 | assertPatternMatch(t, d.pattern, d.dir) |
| 201 | }) |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | func TestInvalidRecursiveFilePatterns(t *testing.T) { |
| 206 | t.Parallel() |
nothing calls this directly
no test coverage detected