mirror of
https://github.com/safishamsi/graphify.git
synced 2026-10-14 07:59:40 +00:00
Add negative control test for an ordinary ASCII path
Confirms the reconstructed prefix set for an ASCII path is byte for
byte identical to what the old ASCII only regex produced, so the fix
changes behavior only for paths the old code was already getting
wrong.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qfdzgbA5KedGEjD1AayNh
(cherry picked from commit 97bd1f37f0)
This commit is contained in:
1 parent
0ea296e9ba
commit
61316e80b6
1 file changed
+9
@@ -572,6 +572,15 @@ def test_korean_defining_file_wins_over_referencing_file(nodes):
|
||||
)
|
||||
|
||||
|
||||
def test_id_prefixes_ascii_path_unchanged():
|
||||
"""Negative control: an ordinary ASCII path's reconstructed prefixes must
|
||||
be identical to what the old ASCII only regex produced."""
|
||||
from graphify.dedup import _id_prefixes
|
||||
assert _id_prefixes("docs/v1/api/README.md") == {
|
||||
"readme", "api_readme", "v1_api_readme", "docs_v1_api_readme",
|
||||
}
|
||||
|
||||
|
||||
def test_same_file_relabel_is_noted(capsys):
|
||||
"""Two labels for one ID from one file: the loser's label is discarded, which is
|
||||
the one drop that used to be silent. It is a note, not a collision warning."""
|
||||
|
||||
Reference in new issue
Block a user