the case-twin test expects each spelling answered apart on a case-sensitive disk
Signed-off-by: dawn <90008@klbr.net>
595 unmodified linesExpand all5965975985996006006016026036045 unmodified lines610611612613614615616617618619620621622623614615616617618619620621622623624625626627628629630631632633634635636637286 unmodified linesExpand all595 unmodified linesExpand all }}
#[test]fn paths_differing_only_by_case_answer_neither() {fn paths_differing_only_by_case_answer_apart_or_neither() { let fixture = fixture(); commit(&fixture.repo, "Readme.md", "hi\n", "add readme", 9); git(&fixture.repo, &["mv", "Readme.md", "README.md"], 10); git(&fixture.repo, &["commit", "-q", "-m", "shout"], 10);5 unmodified lines for key in keys.keys() { assert!(lower.insert(key.to_ascii_lowercase()), "{var} {key}"); } } for path in ["Readme.md", "README.md"] { assert!( served .get( "listCommits", &[("repo", DID), ("ref", "main"), ("path", path)] ) .is_none(), "{path}" ); let log = |path: &str| { served .get( "listCommits", &[("repo", DID), ("ref", "main"), ("path", path)], ) .map(|body| { let log: serde_json::Value = serde_json::from_slice(&body).unwrap(); messages(&log) .into_iter() .map(String::from) .collect::<Vec<_>>() }) }; // a case-folding disk can't hold both spellings, a case-sensitive one answers each apart if paths::folds(&sealed.pool).unwrap() { assert_eq!((log("Readme.md"), log("README.md")), (None, None)); } else { assert_eq!(log("Readme.md").unwrap(), ["shout", "add readme"]); assert_eq!(log("README.md").unwrap(), ["shout"]); } assert_eq!( served.json( "getEntry",286 unmodified linesExpand all