tightened up some logic with indenting and joining lines

added more linebuf tests

extracted all verb match arms into private methods on LineBuf
This commit is contained in:
2026-03-13 19:24:30 -04:00
parent 13227943c6
commit 307386ffc6
43 changed files with 3783 additions and 3408 deletions

View File

@@ -171,10 +171,10 @@ pub fn trap(node: Node) -> ShResult<()> {
#[cfg(test)]
mod tests {
use super::TrapTarget;
use std::str::FromStr;
use nix::sys::signal::Signal;
use crate::state::{self, read_logic};
use crate::testutil::{TestGuard, test_input};
use nix::sys::signal::Signal;
use std::str::FromStr;
// ===================== Pure: TrapTarget parsing =====================
@@ -231,7 +231,9 @@ mod tests {
#[test]
fn display_signal_roundtrip() {
for name in &["INT", "QUIT", "TERM", "USR1", "USR2", "ALRM", "CHLD", "WINCH"] {
for name in &[
"INT", "QUIT", "TERM", "USR1", "USR2", "ALRM", "CHLD", "WINCH",
] {
let target = TrapTarget::from_str(name).unwrap();
assert_eq!(target.to_string(), *name);
}