Test Ctrl-C, job control and hangup with an interactive shell on a terminal

This commit is contained in:
2026-11-04 02:50:35 +01:00
parent 04abf264a0
commit 5389ac97ac
5 changed files with 453 additions and 12 deletions
+10
View File
@@ -18,6 +18,16 @@ fn exit_code_of_entrypoint_is_returned() {
assert_eq!(status.code(), Some(42));
}
#[test]
fn explicit_exit_130_remains_an_exit_code() {
let status = Sandbox::new(&[])
.args(["--", "sh", "-c", "exit 130"])
.status()
.expect("agent-sandbox binary failed to execute");
assert_eq!(status.code(), Some(130));
}
#[test]
fn signal_death_of_entrypoint_becomes_exit_code() {
let status = Sandbox::new(&[])