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

Merge pull request #7332 from RenjiSann/expr-other-approach

expr: Evaluate parenthesis content before checking for closing parenthesis
This commit is contained in:
Sylvestre Ledru 2025-02-24 08:19:05 +01:00 committed by GitHub
commit fae7bb0a57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 44 additions and 49 deletions

View file

@ -370,3 +370,11 @@ fn test_num_str_comparison() {
.succeeds()
.stdout_is("1\n");
}
#[test]
fn test_eager_evaluation() {
new_ucmd!()
.args(&["(", "1", "/", "0"])
.fails()
.stderr_contains("division by zero");
}