annotate tests/expr.test @ 1499:319e79bab052 draft

Separate more commands so single.sh can build them standalone.
author Rob Landley <rob@landley.net>
date Fri, 26 Sep 2014 18:42:23 -0500
parents 8700cbe1cb29
children a97f69a1e406
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
920
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 [ -f testing.sh ] && . testing.sh
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 testing "expr integer" "expr 5" "5\n" "" ""
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 testing "expr integer negative" "expr -5" "-5\n" "" ""
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 testing "expr string" "expr astring" "astring\n" "" ""
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
8 testing "expr 1 + 3" "expr 1 + 3" "4\n" "" ""
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 testing "expr 5 + 6 * 3" "expr 5 + 6 \* 3" "23\n" "" ""
74b5cf0309fc Start of expr, by Daniel Verkamp.
Rob Landley <rob@landley.net>
parents:
diff changeset
10 testing "expr ( 5 + 6 ) * 3" "expr \( 5 + 6 \) \* 3" "33\n" "" ""