1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 11:36:16 +00:00

Merge pull request #5673 from tertsdiepraam/expr-fix-comparison

`expr`: coerce to string before comparing values
This commit is contained in:
Sylvestre Ledru 2023-12-18 22:50:42 +01:00 committed by GitHub
commit 52af36d80b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -362,3 +362,11 @@ fn test_invalid_syntax() {
.stderr_contains("syntax error");
}
}
#[test]
fn test_num_str_comparison() {
new_ucmd!()
.args(&["1a", "<", "1", "+", "1"])
.succeeds()
.stdout_is("1\n");
}