Two manpages with same name+section+distro should be flagged.
(self, store, db_path)
| 87 | assert any("unreachable manpage" in msg for msg in warnings) |
| 88 | |
| 89 | def test_shadowed_duplicate(self, store, db_path): |
| 90 | """Two manpages with same name+section+distro should be flagged.""" |
| 91 | store.add_manpage(_make_manpage("ps", "1"), _make_raw()) |
| 92 | # Directly insert a second one with same name/section/distro but different source |
| 93 | store._conn.execute("PRAGMA foreign_keys = OFF") |
| 94 | store._conn.execute( |
| 95 | "INSERT INTO parsed_manpages(source, name, options, aliases) " |
| 96 | "VALUES (?, ?, '[]', '[]')", |
| 97 | ("ubuntu/26.04/1/procps-ps.1.gz", "ps"), |
| 98 | ) |
| 99 | store._conn.commit() |
| 100 | store._conn.execute("PRAGMA foreign_keys = ON") |
| 101 | issues = db_check(db_path) |
| 102 | errors_list = [msg for sev, msg in issues if sev == "error"] |
| 103 | assert any("shadowed duplicate" in msg for msg in errors_list) |
| 104 | |
| 105 | def test_positional_on_flagged_option(self, store, db_path): |
| 106 | """Options with short/long flags should not have positional set.""" |
nothing calls this directly
no test coverage detected