| 1 | package evidence |
| 2 | |
| 3 | import "testing" |
| 4 | |
| 5 | func TestReviewReportCoverageRejectsSameBasenameInAnotherDirectory(t *testing.T) { |
| 6 | report := ReviewReport{ReviewedPaths: []string{"other/agent.go"}} |
| 7 | if report.CoversPaths([]string{"internal/agent/agent.go"}) { |
| 8 | t.Fatal("same basename in another directory must not cover the required path") |
| 9 | } |
| 10 | report.ReviewedPaths = []string{"/workspace/internal/agent/agent.go"} |
| 11 | if !report.CoversPaths([]string{"internal/agent/agent.go"}) { |
| 12 | t.Fatal("a fuller absolute path must cover the same relative target") |
| 13 | } |
| 14 | report.ReviewedPaths = []string{"agent.go"} |
| 15 | if report.CoversPaths([]string{"internal/agent/agent.go"}) { |
| 16 | t.Fatal("a bare basename must not cover a directory-qualified target") |
| 17 | } |
| 18 | } |
| 19 |