(t *testing.T)
| 288 | } |
| 289 | |
| 290 | func TestValidCurlyBracePatterns(t *testing.T) { |
| 291 | t.Parallel() |
| 292 | |
| 293 | data := []struct { |
| 294 | pattern string |
| 295 | file string |
| 296 | }{ |
| 297 | {"/path/*.{php}", "/path/file.php"}, |
| 298 | {"/path/*.{php,twig}", "/path/file.php"}, |
| 299 | {"/path/*.{php,twig}", "/path/file.twig"}, |
| 300 | {"/path/**/{file.php,file.twig}", "/path/subpath/file.twig"}, |
| 301 | {"/path/{dir1,dir2}/file.php", "/path/dir1/file.php"}, |
| 302 | {"/path/{dir1,dir2}/file.php", "/path/dir2/file.php"}, |
| 303 | {"/app/{app,config,resources}/**/*.php", "/app/app/subpath/file.php"}, |
| 304 | {"/app/{app,config,resources}/**/*.php", "/app/config/subpath/file.php"}, |
| 305 | {"/path/{dir1,dir2}/{a,b}{a,b}.php", "/path/dir1/ab.php"}, |
| 306 | {"/path/{dir1,dir2}/{a,b}{a,b}.php", "/path/dir2/aa.php"}, |
| 307 | {"/path/{dir1,dir2}/{a,b}{a,b}.php", "/path/dir2/bb.php"}, |
| 308 | {"/path/{dir1/test.php,dir2/test.php}", "/path/dir1/test.php"}, |
| 309 | } |
| 310 | |
| 311 | for _, d := range data { |
| 312 | t.Run(d.pattern, func(t *testing.T) { |
| 313 | t.Parallel() |
| 314 | |
| 315 | assertPatternMatch(t, d.pattern, d.file) |
| 316 | }) |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | func TestInvalidCurlyBracePatterns(t *testing.T) { |
| 321 | t.Parallel() |
nothing calls this directly
no test coverage detected