feat: phase 2 — playbooks (am history --save + am playbook, rejeu pas à pas) (closes #51)
This commit is contained in:
@@ -89,7 +89,7 @@ fn command_runs_and_migrates() {
|
||||
let txt = app.paths.state_file.with_file_name("history.txt");
|
||||
std::fs::write(&txt, "install jcode
|
||||
").unwrap();
|
||||
let code = history_cmd::run(&app, None, None, None, false, None, 100, None).unwrap();
|
||||
let code = history_cmd::run(&app, None, None, None, false, None, 100, None, None, None).unwrap();
|
||||
assert_eq!(code, 0);
|
||||
// Migration created the structured file.
|
||||
assert!(history::dir(&app).join("migrated.jsonl").exists());
|
||||
@@ -104,12 +104,12 @@ fn rerun_executes_shell_entry_with_yes() {
|
||||
&HistoryEntry::now("echo rerun-ok").with_kind("shell".to_string()),
|
||||
)
|
||||
.unwrap();
|
||||
let code = history_cmd::run(&app, None, None, None, false, None, 100, Some(1)).unwrap();
|
||||
let code = history_cmd::run(&app, None, None, None, false, None, 100, Some(1), None, None).unwrap();
|
||||
assert_eq!(code, 0);
|
||||
// Numéro hors plage : erreur claire.
|
||||
assert!(history_cmd::run(&app, None, None, None, false, None, 100, Some(9)).is_err());
|
||||
assert!(history_cmd::run(&app, None, None, None, false, None, 100, Some(9), None, None).is_err());
|
||||
// Zéro : erreur claire.
|
||||
assert!(history_cmd::run(&app, None, None, None, false, None, 100, Some(0)).is_err());
|
||||
assert!(history_cmd::run(&app, None, None, None, false, None, 100, Some(0), None, None).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user