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"); +}