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

Function TestInValidNonRecursiveFilePatterns

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

Source from the content-addressed store, hash-verified

155}
156
157func TestInValidNonRecursiveFilePatterns(t *testing.T) {
158 t.Parallel()
159
160 data := []struct {
161 pattern string
162 dir string
163 }{
164 {"/path/*.txt", "/path/file.php"},
165 {"/path/*.php", "/path/subpath/file.php"},
166 {"/*.php", "/path/file.php"},
167 {"*.txt", relativeDir(t, "file.php")},
168 {"*.php", relativeDir(t, "subpath/file.php")},
169 }
170
171 for _, d := range data {
172 t.Run(d.pattern, func(t *testing.T) {
173 t.Parallel()
174
175 assertPatternNotMatch(t, d.pattern, d.dir)
176 })
177 }
178}
179
180func TestValidRecursiveFilePatterns(t *testing.T) {
181 t.Parallel()

Callers

nothing calls this directly

Calls 2

relativeDirFunction · 0.85
assertPatternNotMatchFunction · 0.85

Tested by

no test coverage detected