(t *testing.T, testFn func(*testing.T, string, bool))
| 252 | } |
| 253 | |
| 254 | func runOnExampleWorkingDirs(t *testing.T, testFn func(*testing.T, string, bool)) { |
| 255 | workingDirs := []string{ |
| 256 | memfs.RootDir(), |
| 257 | filepath.Join(memfs.RootDir(), "dir"), |
| 258 | filepath.Join(memfs.RootDir(), "dir1", "dir2"), |
| 259 | } |
| 260 | for _, workingDir := range workingDirs { |
| 261 | workingDir := workingDir |
| 262 | for _, useAbsPath := range []bool{false, true} { |
| 263 | useAbsPath := useAbsPath |
| 264 | t.Run(fmt.Sprintf("workingDir=%s,useAbsPath=%t", workingDir, useAbsPath), func(t *testing.T) { |
| 265 | testFn(t, workingDir, useAbsPath) |
| 266 | }) |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | func TestFileCounts(t *testing.T) { |
| 272 | runOnExampleWorkingDirs(t, testFileCounts) |
no test coverage detected