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

@@ -500,12 +500,8 @@ mod tests {
env::set_var(key, val);
}
guard(prev, move |p| match p {
Some(v) => unsafe {
env::set_var(key, v)
},
None => unsafe {
env::remove_var(key)
},
Some(v) => unsafe { env::set_var(key, v) },
None => unsafe { env::remove_var(key) },
})
}
@@ -522,12 +518,7 @@ mod tests {
fn write_history_file(path: &Path) {
fs::write(
path,
[
": 1;1;first\n",
": 2;1;second\n",
": 3;1;third\n",
]
.concat(),
[": 1;1;first\n", ": 2;1;second\n", ": 3;1;third\n"].concat(),
)
.unwrap();
}
@@ -586,12 +577,7 @@ mod tests {
let hist_path = tmp.path().join("history");
fs::write(
&hist_path,
[
": 1;1;repeat\n",
": 2;1;unique\n",
": 3;1;repeat\n",
]
.concat(),
[": 1;1;repeat\n", ": 2;1;unique\n", ": 3;1;repeat\n"].concat(),
)
.unwrap();