other crates too

This commit is contained in:
Jeremy Rose
2025-08-23 19:36:25 -07:00
parent 5ea08d7150
commit 2ffa009070
43 changed files with 59 additions and 0 deletions
@@ -0,0 +1,23 @@
use codex_execpolicy::Error;
use codex_execpolicy::parse_sed_command;
#[test]
fn parses_simple_print_command() {
assert_eq!(parse_sed_command("122,202p"), Ok(()));
}
#[test]
fn rejects_malformed_print_command() {
assert_eq!(
parse_sed_command("122,202"),
Err(Error::SedCommandNotProvablySafe {
command: "122,202".to_string(),
})
);
assert_eq!(
parse_sed_command("122202"),
Err(Error::SedCommandNotProvablySafe {
command: "122202".to_string(),
})
);
}