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

Function TestInvalidRecursiveFilePatterns

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

Source from the content-addressed store, hash-verified

203}
204
205func TestInvalidRecursiveFilePatterns(t *testing.T) {
206 t.Parallel()
207
208 data := []struct {
209 pattern string
210 dir string
211 }{
212 {"/path/**/*.txt", "/path/file.php"},
213 {"/path/**/*.txt", "/other/file.php"},
214 {"/path/**/*.txt", "/path/subpath/file.php"},
215 {"/path/**/?ilm.php", "/path/subpath/file.php"},
216 {"**/*.php", "/other/file.php"},
217 {".**/*.php", "/other/file.php"},
218 {"./**/*.php", "/other/file.php"},
219 {"/a/**/very/long/path.php", "/a/short.php"},
220 {"", ""},
221 {"/a/**/b/c/d/**/e.php", "/a/x/e.php"},
222 }
223
224 for _, d := range data {
225 t.Run(d.pattern, func(t *testing.T) {
226 t.Parallel()
227
228 assertPatternNotMatch(t, d.pattern, d.dir)
229 })
230 }
231}
232
233func TestValidDirectoryPatterns(t *testing.T) {
234 t.Parallel()

Callers

nothing calls this directly

Calls 1

assertPatternNotMatchFunction · 0.85

Tested by

no test coverage detected