(t *testing.T)
| 131 | } |
| 132 | |
| 133 | func TestValidNonRecursiveFilePatterns(t *testing.T) { |
| 134 | t.Parallel() |
| 135 | |
| 136 | data := []struct { |
| 137 | pattern string |
| 138 | dir string |
| 139 | }{ |
| 140 | {"/*.php", "/file.php"}, |
| 141 | {"/path/*.php", "/path/file.php"}, |
| 142 | {"/path/?ile.php", "/path/file.php"}, |
| 143 | {"/path/file.php", "/path/file.php"}, |
| 144 | {"*.php", relativeDir(t, "file.php")}, |
| 145 | {"./*.php", relativeDir(t, "file.php")}, |
| 146 | } |
| 147 | |
| 148 | for _, d := range data { |
| 149 | t.Run(d.pattern, func(t *testing.T) { |
| 150 | t.Parallel() |
| 151 | |
| 152 | assertPatternMatch(t, d.pattern, d.dir) |
| 153 | }) |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | func TestInValidNonRecursiveFilePatterns(t *testing.T) { |
| 158 | t.Parallel() |
nothing calls this directly
no test coverage detected