diff options
Diffstat (limited to 'tests/expr.test')
-rwxr-xr-x | tests/expr.test | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/expr.test b/tests/expr.test index 33900d7a..c95d0301 100755 --- a/tests/expr.test +++ b/tests/expr.test @@ -2,20 +2,20 @@ [ -f testing.sh ] && . testing.sh -testing "expr integer" "expr 5" "5\n" "" "" -testing "expr integer negative" "expr -5" "-5\n" "" "" -testing "expr string" "expr astring" "astring\n" "" "" -testing "expr 1 + 3" "expr 1 + 3" "4\n" "" "" -testing "expr 5 + 6 * 3" "expr 5 + 6 \* 3" "23\n" "" "" -testing "expr ( 5 + 6 ) * 3" "expr \( 5 + 6 \) \* 3" "33\n" "" "" -testing "expr * / same priority" "expr 4 \* 3 / 2" "6\n" "" "" -testing "expr / * same priority" "expr 3 / 2 \* 4" "4\n" "" "" -testing "expr & before |" "expr 0 \| 1 \& 0" "0\n" "" "" -testing "expr | after &" "expr 1 \| 0 \& 0" "1\n" "" "" -testing "expr | & same priority" "expr 0 \& 0 \| 1" "1\n" "" "" -testing "expr % * same priority" "expr 3 % 2 \* 4" "4\n" "" "" -testing "expr * % same priority" "expr 3 \* 2 % 4" "2\n" "" "" -testing "expr = > same priority" "expr 0 = 2 \> 3" "0\n" "" "" -testing "expr > = same priority" "expr 3 \> 2 = 1" "1\n" "" "" -testing "expr string becomes integer" "expr ab21xx : '[^0-9]*\([0-9]*\)' + 3" \ +testing "integer" "expr 5" "5\n" "" "" +testing "integer negative" "expr -5" "-5\n" "" "" +testing "string" "expr astring" "astring\n" "" "" +testing "1 + 3" "expr 1 + 3" "4\n" "" "" +testing "5 + 6 * 3" "expr 5 + 6 \* 3" "23\n" "" "" +testing "( 5 + 6 ) * 3" "expr \( 5 + 6 \) \* 3" "33\n" "" "" +testing "* / same priority" "expr 4 \* 3 / 2" "6\n" "" "" +testing "/ * same priority" "expr 3 / 2 \* 4" "4\n" "" "" +testing "& before |" "expr 0 \| 1 \& 0" "0\n" "" "" +testing "| after &" "expr 1 \| 0 \& 0" "1\n" "" "" +testing "| & same priority" "expr 0 \& 0 \| 1" "1\n" "" "" +testing "% * same priority" "expr 3 % 2 \* 4" "4\n" "" "" +testing "* % same priority" "expr 3 \* 2 % 4" "2\n" "" "" +testing "= > same priority" "expr 0 = 2 \> 3" "0\n" "" "" +testing "> = same priority" "expr 3 \> 2 = 1" "1\n" "" "" +testing "string becomes integer" "expr ab21xx : '[^0-9]*\([0-9]*\)' + 3" \ "24\n" "" "" |