(t *testing.T)
| 203 | } |
| 204 | |
| 205 | func 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 | |
| 233 | func TestValidDirectoryPatterns(t *testing.T) { |
| 234 | t.Parallel() |
nothing calls this directly
no test coverage detected