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

Function TestInvalidDirectoryPatterns

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

Source from the content-addressed store, hash-verified

258}
259
260func TestInvalidDirectoryPatterns(t *testing.T) {
261 t.Parallel()
262
263 data := []struct {
264 pattern string
265 dir string
266 }{
267 {"/path/subpath/*.php", "/path/other/file.php"},
268 {"/path/*/*.php", "/path/subpath/subpath/file.php"},
269 {"/path/?/*.php", "/path/subpath/file.php"},
270 {"/path/*/*/*.php", "/path/subpath/file.php"},
271 {"/path/*/*/*.php", "/path/subpath/subpath/subpath/file.php"},
272 {"/path/**/vendor/*.php", "/path/subpath/vendor/subpath/file.php"},
273 {"/path/**/vendor/*.php", "/path/subpath/file.php"},
274 {"/path/**/vendor/**/*.php", "/path/subpath/file.php"},
275 {"/path/**/vendor/**/*.txt", "/path/subpath/vendor/subpath/file.php"},
276 {"/path/**/vendor/**/*.php", "/path/subpath/subpath/subpath/file.php"},
277 {"/path/**/vendor/*/*.php", "/path/subpath/vendor/subpath/subpath/file.php"},
278 {"/path*/path*", "/path1/path1/file.php"},
279 }
280
281 for _, d := range data {
282 t.Run(d.pattern, func(t *testing.T) {
283 t.Parallel()
284
285 assertPatternNotMatch(t, d.pattern, d.dir)
286 })
287 }
288}
289
290func TestValidCurlyBracePatterns(t *testing.T) {
291 t.Parallel()

Callers

nothing calls this directly

Calls 1

assertPatternNotMatchFunction · 0.85

Tested by

no test coverage detected