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

Function TestValidRecursiveDirectories

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

Source from the content-addressed store, hash-verified

82}
83
84func TestValidRecursiveDirectories(t *testing.T) {
85 t.Parallel()
86
87 data := []struct {
88 pattern string
89 file string
90 }{
91 {"/path", "/path/file.php"},
92 {"/path", "/path/subpath/file.php"},
93 {"/path/", "/path/subpath/file.php"},
94 {"/path**", "/path/subpath/file.php"},
95 {"/path/**", "/path/subpath/file.php"},
96 {"/path/**/", "/path/subpath/file.php"},
97 {".", relativeDir(t, "file.php")},
98 {".", relativeDir(t, "subpath/file.php")},
99 {"./**", relativeDir(t, "subpath/file.php")},
100 {"..", relativeDir(t, "subpath/file.php")},
101 }
102
103 for _, d := range data {
104 t.Run(d.pattern, func(t *testing.T) {
105 t.Parallel()
106
107 assertPatternMatch(t, d.pattern, d.file)
108 })
109 }
110}
111
112func TestInvalidRecursiveDirectories(t *testing.T) {
113 t.Parallel()

Callers

nothing calls this directly

Calls 2

relativeDirFunction · 0.85
assertPatternMatchFunction · 0.85

Tested by

no test coverage detected