MCPcopy Index your code
hub / github.com/php/frankenphp / TestInvalidCurlyBracePatterns

Function TestInvalidCurlyBracePatterns

internal/watcher/pattern_test.go:320–344  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

318}
319
320func TestInvalidCurlyBracePatterns(t *testing.T) {
321 t.Parallel()
322
323 data := []struct {
324 pattern string
325 dir string
326 }{
327 {"/path/*.{php}", "/path/file.txt"},
328 {"/path/*.{php,twig}", "/path/file.txt"},
329 {"/path/{file.php,file.twig}", "/path/file.txt"},
330 {"/path/{dir1,dir2}/file.php", "/path/dir3/file.php"},
331 {"/path/{dir1,dir2}/**/*.php", "/path/dir1/subpath/file.txt"},
332 {"/path/{dir1,dir2}/{a,b}{a,b}.php", "/path/dir1/ac.php"},
333 {"/path/{}/{a,b}{a,b}.php", "/path/dir1/ac.php"},
334 {"/path/}dir{/{a,b}{a,b}.php", "/path/dir1/aa.php"},
335 }
336
337 for _, d := range data {
338 t.Run(d.pattern, func(t *testing.T) {
339 t.Parallel()
340
341 assertPatternNotMatch(t, d.pattern, d.dir)
342 })
343 }
344}
345
346func TestAnAssociatedEventTriggersTheWatcher(t *testing.T) {
347 t.Parallel()

Callers

nothing calls this directly

Calls 1

assertPatternNotMatchFunction · 0.85

Tested by

no test coverage detected