终端执行的单元测试:dash 作为 sh 时允许输出里多一行 Terminated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2df67bc639
commit
65ea32acfb
1 file changed
+5
-1
@@ -444,7 +444,11 @@ mod sh {
|
||||
|
||||
// Several lines, and a command killed by a signal.
|
||||
let (found, _) = run_line("cd /\npwd\nkill -TERM $$");
|
||||
assert_eq!(found[1], Scanned::Output(b"/\n".to_vec()));
|
||||
// dash, as the sh that waits for it, also says "Terminated" there.
|
||||
let Scanned::Output(output) = &found[1] else {
|
||||
panic!("{found:?}");
|
||||
};
|
||||
assert!(output.starts_with(b"/\n"), "{found:?}");
|
||||
assert_eq!(found[2], Scanned::End(143));
|
||||
let (found, _) = run_line("kill -INT $$");
|
||||
assert_eq!(found.last(), Some(&Scanned::End(130)));
|
||||
|
||||
Reference in new issue
Block a user