C1: alpha dry run fixes (Ctrl+C in terminal, ignored colour, find singular)
- Terminal: undo an inherited "ignore Ctrl+C" flag before starting a ConPTY shell (lutra_proc::enable_ctrl_c). Lutra started by the lutra CLI (CREATE_NEW_PROCESS_GROUP) passed it to every shell, so Ctrl+C stopped nothing. Test reruns itself with that flag. - Engine: an edited .gitignore/.ignore reports TreeChanged for its folder, so the tree greys newly ignored files (Add to .gitignore). - Find: "1 match", "1 file" instead of "1 files". - docs/alpha-checklist.md: steps corrected after the Windows dry run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
30de747ad6
commit
e228d11ef9
11 changed files with 173 additions and 20 deletions
|
|
@ -381,6 +381,29 @@ fn tree_changes_are_reported_for_listed_directories() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn editing_gitignore_reports_its_directory_with_the_new_ignored_flag() {
|
||||
let (dir, mut engine, _) = open_project(&[(".gitignore", b"/var/\n"), ("notes.txt", b"note")]);
|
||||
let ignored = |engine: &mut Engine| {
|
||||
let listing = run(engine, "project.children", json!({"dir": ""})).value;
|
||||
listing["entries"]
|
||||
.as_array()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.find(|e| e["name"] == "notes.txt")
|
||||
.unwrap()["ignored"]
|
||||
.as_bool()
|
||||
.unwrap()
|
||||
};
|
||||
assert!(!ignored(&mut engine));
|
||||
fs::write(dir.path().join(".gitignore"), "/var/\n/notes.txt\n").unwrap();
|
||||
wait_for(
|
||||
&mut engine,
|
||||
|e| matches!(e, Event::TreeChanged { dir } if dir.is_empty()),
|
||||
);
|
||||
assert!(ignored(&mut engine));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn watched_directories_are_capped_least_recently_listed_first() {
|
||||
let (dir, mut engine, _) = open_project(&[]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue