Insert a mapping pointing to a non-existent manpage.
(self, store, db_path)
| 60 | assert any("malformed source path" in msg for msg in errors_list) |
| 61 | |
| 62 | def test_orphaned_mapping(self, store, db_path): |
| 63 | """Insert a mapping pointing to a non-existent manpage.""" |
| 64 | store._conn.execute("PRAGMA foreign_keys = OFF") |
| 65 | store._conn.execute( |
| 66 | "INSERT INTO mappings(src, dst, score) VALUES (?, ?, ?)", |
| 67 | ("ghost", "ubuntu/26.04/1/ghost.1.gz", 10), |
| 68 | ) |
| 69 | store._conn.commit() |
| 70 | store._conn.execute("PRAGMA foreign_keys = ON") |
| 71 | issues = db_check(db_path) |
| 72 | errors_list = [msg for sev, msg in issues if sev == "error"] |
| 73 | assert any("orphaned mapping" in msg for msg in errors_list) |
| 74 | |
| 75 | def test_unreachable_manpage(self, store, db_path): |
| 76 | """A manpage with no mappings should be flagged as a warning.""" |
nothing calls this directly
no outgoing calls
no test coverage detected