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

Function TestValidNonRecursiveFilePatterns

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

Source from the content-addressed store, hash-verified

131}
132
133func TestValidNonRecursiveFilePatterns(t *testing.T) {
134 t.Parallel()
135
136 data := []struct {
137 pattern string
138 dir string
139 }{
140 {"/*.php", "/file.php"},
141 {"/path/*.php", "/path/file.php"},
142 {"/path/?ile.php", "/path/file.php"},
143 {"/path/file.php", "/path/file.php"},
144 {"*.php", relativeDir(t, "file.php")},
145 {"./*.php", relativeDir(t, "file.php")},
146 }
147
148 for _, d := range data {
149 t.Run(d.pattern, func(t *testing.T) {
150 t.Parallel()
151
152 assertPatternMatch(t, d.pattern, d.dir)
153 })
154 }
155}
156
157func TestInValidNonRecursiveFilePatterns(t *testing.T) {
158 t.Parallel()

Callers

nothing calls this directly

Calls 2

relativeDirFunction · 0.85
assertPatternMatchFunction · 0.85

Tested by

no test coverage detected