(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestFolderConfigIsExcludedPath(t *testing.T) { |
| 38 | t.Parallel() |
| 39 | |
| 40 | base := t.TempDir() |
| 41 | excluded := filepath.Join(base, "permanent") |
| 42 | cfg := &FolderConfig{ExcludePaths: []string{excluded}} |
| 43 | |
| 44 | if !cfg.isExcludedPath(excluded) { |
| 45 | t.Fatal("expected exact excluded path to match") |
| 46 | } |
| 47 | |
| 48 | if !cfg.isExcludedPath(filepath.Join(excluded, "sub", "file.rar")) { |
| 49 | t.Fatal("expected child path of excluded folder to match") |
| 50 | } |
| 51 | |
| 52 | if cfg.isExcludedPath(excluded + "_other") { |
| 53 | t.Fatal("did not expect prefix-only sibling path to match") |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | func TestFoldersProcessEventCurrentBehavior(t *testing.T) { |
| 58 | t.Parallel() |
nothing calls this directly
no test coverage detected