completely rewrote test suite for top level src files and all builtin files

This commit is contained in:
2026-03-06 23:42:14 -05:00
parent 42b4120055
commit b137c38e92
44 changed files with 5909 additions and 582 deletions

View File

@@ -17,6 +17,9 @@ pub mod shopt;
pub mod signal;
pub mod state;
#[cfg(test)]
pub mod testutil;
use std::os::fd::BorrowedFd;
use std::process::ExitCode;
use std::sync::atomic::Ordering;
@@ -361,11 +364,13 @@ fn handle_readline_event(readline: &mut ShedVi, event: ShResult<ReadlineEvent>)
pre_exec.exec_with(&input);
// Time this command and temporarily restore cooked terminal mode while it runs.
let start = Instant::now();
write_meta(|m| m.start_timer());
if let Err(e) = RawModeGuard::with_cooked_mode(|| {
exec_input(input.clone(), None, true, Some("<stdin>".into()))
}) {
// CleanExit signals an intentional shell exit; any other error is printed.
match e.kind() {
ShErrKind::CleanExit(code) => {
QUIT_CODE.store(*code, Ordering::SeqCst);