(t *testing.T)
| 258 | } |
| 259 | |
| 260 | func TestInvalidDirectoryPatterns(t *testing.T) { |
| 261 | t.Parallel() |
| 262 | |
| 263 | data := []struct { |
| 264 | pattern string |
| 265 | dir string |
| 266 | }{ |
| 267 | {"/path/subpath/*.php", "/path/other/file.php"}, |
| 268 | {"/path/*/*.php", "/path/subpath/subpath/file.php"}, |
| 269 | {"/path/?/*.php", "/path/subpath/file.php"}, |
| 270 | {"/path/*/*/*.php", "/path/subpath/file.php"}, |
| 271 | {"/path/*/*/*.php", "/path/subpath/subpath/subpath/file.php"}, |
| 272 | {"/path/**/vendor/*.php", "/path/subpath/vendor/subpath/file.php"}, |
| 273 | {"/path/**/vendor/*.php", "/path/subpath/file.php"}, |
| 274 | {"/path/**/vendor/**/*.php", "/path/subpath/file.php"}, |
| 275 | {"/path/**/vendor/**/*.txt", "/path/subpath/vendor/subpath/file.php"}, |
| 276 | {"/path/**/vendor/**/*.php", "/path/subpath/subpath/subpath/file.php"}, |
| 277 | {"/path/**/vendor/*/*.php", "/path/subpath/vendor/subpath/subpath/file.php"}, |
| 278 | {"/path*/path*", "/path1/path1/file.php"}, |
| 279 | } |
| 280 | |
| 281 | for _, d := range data { |
| 282 | t.Run(d.pattern, func(t *testing.T) { |
| 283 | t.Parallel() |
| 284 | |
| 285 | assertPatternNotMatch(t, d.pattern, d.dir) |
| 286 | }) |
| 287 | } |
| 288 | } |
| 289 | |
| 290 | func TestValidCurlyBracePatterns(t *testing.T) { |
| 291 | t.Parallel() |
nothing calls this directly
no test coverage detected