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

Function TestValidRecursiveFilePatterns

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

Source from the content-addressed store, hash-verified

178}
179
180func 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
205func TestInvalidRecursiveFilePatterns(t *testing.T) {
206 t.Parallel()

Callers

nothing calls this directly

Calls 2

relativeDirFunction · 0.85
assertPatternMatchFunction · 0.85

Tested by

no test coverage detected