summaryrefslogtreecommitdiffstats
path: root/tests/by-util
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2023-12-18 22:50:42 +0100
committerGitHub <noreply@github.com>2023-12-18 22:50:42 +0100
commit52af36d80bbeb2445a739c622362399cce8849ca (patch)
tree2a1b75a8c202cbed673b63a9f30dafb1d1f90a6c /tests/by-util
parentb32c93ee5e7e01a749a7cba40044f3570d39719a (diff)
parent00b9cbe09e7dd0ef68156f541c9dd462c4f4a3bb (diff)
Merge pull request #5673 from tertsdiepraam/expr-fix-comparison
`expr`: coerce to string before comparing values
Diffstat (limited to 'tests/by-util')
-rw-r--r--tests/by-util/test_expr.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/by-util/test_expr.rs b/tests/by-util/test_expr.rs
index ebc2c832f..7c9290d6a 100644
--- a/tests/by-util/test_expr.rs
+++ b/tests/by-util/test_expr.rs
@@ -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");
+}