diff --git a/tests/test_pattern_coverage.py b/tests/test_pattern_coverage.py index 2acaba0..1cfb0d3 100644 --- a/tests/test_pattern_coverage.py +++ b/tests/test_pattern_coverage.py @@ -89,6 +89,18 @@ EXTRACTION_VECTORS = [ "/* A real base rule, not just descendants: the check reads a\n" " .ghost, class that only ever appears as an ancestor */\n.check { }\n", [("css", "check")]), + # The rest of #2990's verify list, which this scan satisfies as written: + # a comment holding a WHOLE rule defines nothing, and an unterminated + # comment does not swallow the file. The phantom it was filed for — + # `.editor-body` out of a wrapped comment in TaskEditorView.vue, a + # persisted row with a `used_by` count of zero inflating unused_css — is + # among the twenty-two this removes. + ("comment-containing-a-whole-rule", + "/* .ghost {\n color: red;\n } */\n.real { color: blue; }\n", + [("css", "real")]), + ("unterminated-block-comment", + "/* never closed\n.after { color: red; }\n", + [("css", "after")]), # A string that HOLDS a comment marker is not a comment — the case that # made the first draft of the scan eat 70 lines of live code. ("string-holds-a-marker",