From 4513b58e590748cfcf0197ef1fbf4de1c9b08e37 Mon Sep 17 00:00:00 2001 From: Dorian Peron Date: Sat, 22 Feb 2025 04:17:36 +0100 Subject: [PATCH] test(expr): Add test for eager evaluation --- tests/by-util/test_expr.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/by-util/test_expr.rs b/tests/by-util/test_expr.rs index 5cbf91e0c..3e35887c4 100644 --- a/tests/by-util/test_expr.rs +++ b/tests/by-util/test_expr.rs @@ -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"); +}