from pathlib import Path
import json
x=json.loads((Path(__file__).parent/'references.json').read_text(encoding='utf-8'));r=[]
for q in x['references']:
 r.append({'reference':q,'exact_match':q in x['files'],'casefold_candidates':[n for n in x['files'] if n.casefold()==q.casefold()]})
assert r[0]['exact_match'] and not r[1]['exact_match'] and len(r[1]['casefold_candidates'])==1;print(json.dumps(r,indent=2))
