diff --git a/crates/tests/src/lib.rs b/crates/tests/src/lib.rs index eb6e23e..afde640 100644 --- a/crates/tests/src/lib.rs +++ b/crates/tests/src/lib.rs @@ -868,6 +868,31 @@ async fn arithmetic() { .assert_stdout("16\n") .run() .await; + + TestBuilder::new() + .command("echo $((a=1, ++a))") + .assert_stdout("2\n") + .run() + .await; + + TestBuilder::new() + .command("echo $((a=1, a++))") + .assert_stdout("1\n") + .run() + .await; + + TestBuilder::new() + .command("echo $((a=1, a--))") + .assert_stdout("1\n") + .run() + .await; + + TestBuilder::new() + .command("echo $((a=1, --a))") + .assert_stdout("0\n") + .run() + .await; + } #[tokio::test]