fix: enable clippy on tests (#870)
https://github.com/openai/codex/pull/855 added the clippy warning to disallow `unwrap()`, but apparently we were not verifying that tests were "clippy clean" in CI, so I ended up with a lot of local errors in VS Code. This turns on the check in CI and fixes the offenders.
This commit is contained in:
@@ -67,7 +67,10 @@ fn test_head_one_flag_one_file() -> Result<()> {
|
||||
exec: ValidExec {
|
||||
program: "head".to_string(),
|
||||
flags: vec![],
|
||||
opts: vec![MatchedOpt::new("-n", "100", ArgType::PositiveInteger).unwrap()],
|
||||
opts: vec![
|
||||
MatchedOpt::new("-n", "100", ArgType::PositiveInteger)
|
||||
.expect("should validate")
|
||||
],
|
||||
args: vec![MatchedArg::new(
|
||||
2,
|
||||
ArgType::ReadableFile,
|
||||
|
||||
@@ -47,7 +47,10 @@ fn test_sed_print_specific_lines_with_e_flag() -> Result<()> {
|
||||
exec: ValidExec {
|
||||
program: "sed".to_string(),
|
||||
flags: vec![MatchedFlag::new("-n")],
|
||||
opts: vec![MatchedOpt::new("-e", "122,202p", ArgType::SedCommand).unwrap()],
|
||||
opts: vec![
|
||||
MatchedOpt::new("-e", "122,202p", ArgType::SedCommand)
|
||||
.expect("should validate")
|
||||
],
|
||||
args: vec![MatchedArg::new(3, ArgType::ReadableFile, "hello.txt")?],
|
||||
system_path: vec!["/usr/bin/sed".to_string()],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user