Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/fredshell-ansi/src/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ mod tests {
let (r, n) = Da1Response::decode(input).unwrap();
assert_eq!(n, 5);
assert_eq!(r.id, 6);
assert!(r.capabilities().is_empty());
assert_eq!(r.capabilities(), []);
}

#[test]
Expand Down Expand Up @@ -969,7 +969,7 @@ mod tests {
let input = b"\x1b]52;p;\x1b\\";
let (r, _) = Osc52ReadResponse::decode(input).unwrap();
assert_eq!(r.selection, Osc52Selection::Primary);
assert!(r.payload.is_empty());
assert_eq!(r.payload, b"");
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/fredshell-core/src/exec/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ mod tests {

assert_eq!(status, ExitStatus::SUCCESS);
assert_eq!(stdout, b"echo-args hi there\n");
assert!(stderr.is_empty());
assert_eq!(stderr, b"");
}

#[test]
Expand Down
6 changes: 3 additions & 3 deletions crates/fredshell-core/src/exec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ mod tests {
testing::run_source_capturing("exit\necho unreachable\n", &mut env).expect("ok");
assert_eq!(captured.result.status, ExitStatus::SUCCESS);
assert!(captured.result.exit_requested);
assert!(captured.stdout.is_empty());
assert_eq!(captured.stdout, b"");
}

#[test]
Expand Down Expand Up @@ -376,7 +376,7 @@ mod tests {
let captured = testing::run_source_capturing("echo hi", &mut env).expect("ok");
assert_eq!(captured.result.status, ExitStatus::SUCCESS);
assert_eq!(captured.stdout, b"hi\n");
assert!(captured.stderr.is_empty());
assert_eq!(captured.stderr, b"");
}

#[test]
Expand All @@ -385,7 +385,7 @@ mod tests {
let mut env = sandbox();
let captured = testing::run_source_capturing("echo bad 1>&2", &mut env).expect("ok");
assert_eq!(captured.result.status, ExitStatus::SUCCESS);
assert!(captured.stdout.is_empty());
assert_eq!(captured.stdout, b"");
assert_eq!(captured.stderr, b"bad\n");
}

Expand Down
6 changes: 3 additions & 3 deletions crates/fredshell-core/src/exec/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ mod tests {
let mut env = sandbox();
let c = run_source_capturing("", &mut env).expect("ok");
assert_eq!(c.result.status, ExitStatus::SUCCESS);
assert!(c.stdout.is_empty());
assert!(c.stderr.is_empty());
assert_eq!(c.stdout, b"");
assert_eq!(c.stderr, b"");
}

#[test]
Expand Down Expand Up @@ -245,7 +245,7 @@ mod tests {
let mut handle = buf.clone();
handle.write_all(b"hello").expect("write ok");
assert_eq!(buf.take(), b"hello");
assert!(buf.take().is_empty());
assert_eq!(buf.take(), b"");
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions crates/fredshell-core/src/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ mod tests {
let mut line_buf = Vec::new();
let outcome = pump_input_once(input, Some(output), &mut line_buf).unwrap();
assert_eq!(outcome, InputOutcome::Interrupted);
assert!(line_buf.is_empty());
assert_eq!(line_buf, b"");

// The pump echoes the leading "abc" then "^C\r\n".
let mut master_reader = std::fs::File::from(pty.master().try_clone().unwrap());
Expand Down Expand Up @@ -625,7 +625,7 @@ mod tests {
let mut line_buf = Vec::new();
let outcome = pump_input_once(input, Some(output), &mut line_buf).unwrap();
assert_eq!(outcome, InputOutcome::Continue);
assert!(line_buf.is_empty());
assert_eq!(line_buf, b"");
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/fredshell-core/src/tty/probe/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ mod tests {
let mut expected = Expected::default();
decode_available(&mut buf, &mut expected, &mut caps);

assert!(buf.is_empty());
assert_eq!(buf, b"");
assert!(expected.da1);
assert_eq!(caps.color, ColorSupport::Ansi16);
}
Expand Down
4 changes: 2 additions & 2 deletions crates/fredshell-core/src/tty/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ mod tests {
let handlers = Handlers { reader };
let mut buf = [0u8; 8];
let drained = handlers.drain(&mut buf).unwrap();
assert!(drained.is_empty());
assert_eq!(drained, []);
}

#[test]
Expand Down Expand Up @@ -621,7 +621,7 @@ mod tests {
let handlers = Handlers { reader };
let mut buf: [u8; 0] = [];
let drained = handlers.drain(&mut buf).unwrap();
assert!(drained.is_empty());
assert_eq!(drained, []);
}

#[test]
Expand Down
6 changes: 3 additions & 3 deletions crates/fredshell-spec-runner/src/case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,12 @@ script = "exit 0\n"
assert_eq!(c.description, "minimal");
assert_eq!(c.status, CaseStatus::Pass);
assert_eq!(c.script, "exit 0\n");
assert!(c.tags.is_empty());
assert_eq!(c.tags, Vec::<String>::new());
assert!(c.bash_version_min.is_none());
assert!(c.env.home.is_none());
assert!(c.fs_skeleton.is_none());
assert!(c.expected.stdout.is_empty());
assert!(c.expected.stderr.is_empty());
assert_eq!(c.expected.stdout, b"");
assert_eq!(c.expected.stderr, b"");
assert_eq!(c.expected.exit, 0);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/fredshell-spec-runner/src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ mod tests {
let mut handle = buf.clone();
handle.write_all(b"once").unwrap();
assert_eq!(buf.take(), b"once");
assert!(buf.take().is_empty());
assert_eq!(buf.take(), b"");
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions crates/fredshell-spec-runner/tests/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ fn exit_zero_smoke_case_passes() {

let case = Case::load(&case_path).expect("smoke case loads cleanly");
assert_eq!(case.script, "exit 0\n");
assert!(case.expected.stdout.is_empty());
assert!(case.expected.stderr.is_empty());
assert_eq!(case.expected.stdout, b"");
assert_eq!(case.expected.stderr, b"");
assert_eq!(case.expected.exit, 0);

let result = run_case(&case).expect("smoke case runs without harness-level error");
Expand Down
30 changes: 15 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions xtask/src/check_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ mod tests {
let row = parse_support_row("| 3.1 | cd dir | support | |")
.expect("row with a blank Corpus cell should still parse");
assert_eq!(row.number, "3.1");
assert!(row.corpus.is_empty());
assert_eq!(row.corpus, "");
}

// --- parse_sheet ------------------------------------------------
Expand All @@ -831,14 +831,14 @@ mod tests {
assert_eq!(sheet.rows.len(), 1);
assert_eq!(sheet.rows[0].number, "3.1");
assert!(sheet.sections.contains(&"## 3. Support matrix".to_owned()));
assert!(!sheet.deferred_body.is_empty());
assert_ne!(sheet.deferred_body, "");
}

#[test]
fn parse_sheet_detects_empty_deferred_section() {
let body = "## 1. Synopsis\n\nx\n\n## 6. Deferred rows\n\n## 8. References\n";
let sheet = parse_sheet("x", body);
assert!(sheet.deferred_body.is_empty());
assert_eq!(sheet.deferred_body, "");
}

#[test]
Expand Down Expand Up @@ -904,7 +904,7 @@ mod tests {
#[test]
fn validate_structure_passes_for_valid_sheet() {
let sheet = parse_sheet("cd", &valid_sheet_body("builtins/cd_dir.case.toml"));
assert!(validate_sheet_structure(&sheet).is_empty());
assert_eq!(validate_sheet_structure(&sheet), Vec::<SheetError>::new());
}

#[test]
Expand Down Expand Up @@ -949,7 +949,7 @@ mod tests {
- **3.1 — `-e`.** Use `cd && ls` for now.\n\n\
## 8. References\n\nx\n";
let sheet = parse_sheet("cd", body);
assert!(validate_sheet_structure(&sheet).is_empty());
assert_eq!(validate_sheet_structure(&sheet), Vec::<SheetError>::new());
}

// --- check_support_row_resolves --------------------------------
Expand Down Expand Up @@ -1000,7 +1000,7 @@ mod tests {
check_support_row_resolves(tmp.path(), "cd", &row, &mut refs),
1
);
assert!(refs.is_empty());
assert_eq!(refs, Vec::<CorpusRef>::new());
}

#[test]
Expand Down
Loading