1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

Merge branch 'main' into fix-expr-syntex-error

This commit is contained in:
Luv_Ray 2023-10-14 23:50:21 +08:00 committed by GitHub
commit 46b8b41e3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -300,3 +300,16 @@ fn test_escape() {
.succeeds() .succeeds()
.stdout_only("2\n"); .stdout_only("2\n");
} }
#[test]
fn test_invalid_syntax() {
let invalid_syntaxes = [["12", "12"], ["12", "|"], ["|", "12"]];
for invalid_syntax in invalid_syntaxes {
new_ucmd!()
.args(&invalid_syntax)
.fails()
.code_is(2)
.stderr_contains("syntax error");
}
}