improvise-a0i3: red test, the walk under the user's pathspec and attribute settings

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
Edward Langley
2026-09-23 17:28:43 -07:00
parent 322de37053
commit da0eb3d7cb
+26
View File
@@ -266,3 +266,29 @@ fn a_scratch_repo_ignores_the_users_default_ignore_and_attributes_files() {
);
}
}
/// improvise-a0i3: pathspec magic and an attribute source are process-wide git
/// settings, and `--local-env-vars` lists none. Evidence: `context/test-evidence/tui.md`.
#[test]
fn the_walk_ignores_the_users_pathspec_and_attribute_settings() {
let settings = [
("GIT_LITERAL_PATHSPECS", "1"),
("GIT_GLOB_PATHSPECS", "1"),
("GIT_NOGLOB_PATHSPECS", "1"),
("GIT_ICASE_PATHSPECS", "1"),
("GIT_ATTR_SOURCE", "HEAD"),
];
let mut failed = Vec::new();
for (name, value) in settings {
for test in [
"a_gzipped_document_is_walked",
"every_shipped_document_loads",
] {
let out = rerun_with_env(test, &[(name, Path::new(value))]);
if !out.status.success() {
failed.push(format!("{test} under {name}={value}: {}", told(&out)));
}
}
}
assert!(failed.is_empty(), "{}", failed.join("\n"));
}