Skip to content

Commit 6867452

Browse files
grossirclaude
andcommitted
test: guard law and journal paths for relaxed reporter whitespace
Law (laws.json) and journal (journals.json) citations build their regexes through the same _add_regexes chokepoint as case reporters, so the whitespace relaxation applies to them too. Add spaced "U. S. C." and "F. B. I. S." cases -- neither spaced form is a registered variation, so they match only via the relaxation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7744dbc commit 6867452

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_FindTest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,17 @@ def test_relaxed_reporter_whitespace(self):
890890
[case_citation(volume='799', page='797', reporter='N.Y.S.2d',
891891
reporter_found='N. Y. S. 2d', short=True,
892892
metadata={'antecedent_guess': 'Adarand'})]),
893+
# Law citations (laws.json) and journal citations (journals.json)
894+
# build their regexes through the same chokepoint, so the
895+
# relaxation applies to them too. Spaced "U. S. C." / "F. B. I. S."
896+
# are not registered variations, so these only match via it.
897+
('18 U. S. C. § 4241',
898+
[law_citation('18 U. S. C. § 4241', reporter='U.S.C.',
899+
reporter_found='U. S. C.',
900+
groups={'title': '18', 'section': '4241'})]),
901+
('1 F. B. I. S. 1',
902+
[journal_citation('1 F. B. I. S. 1', reporter='F.B.I.S.',
903+
reporter_found='F. B. I. S.')]),
893904
)
894905
# fmt: on
895906
self.run_test_pairs(test_pairs, "Relaxed reporter whitespace")

0 commit comments

Comments
 (0)