aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-12-02 16:53:03 -0600
committerRob Landley <rob@landley.net>2018-12-02 16:53:03 -0600
commitb742998a2671818ceb5295d1a3f2f2c062a39028 (patch)
treea222febb10fca4df789d31b9536a257ae619b527 /tests
parent01844db4fb92aa7ae6eb12b160f1978235a449d5 (diff)
downloadtoybox-b742998a2671818ceb5295d1a3f2f2c062a39028.tar.gz
Teach testcmd to say short name rather than full path.
Diffstat (limited to 'tests')
-rw-r--r--tests/test.test26
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/test.test b/tests/test.test
index 8b60c0bd..7f574f08 100644
--- a/tests/test.test
+++ b/tests/test.test
@@ -44,16 +44,16 @@ rmdir d
# TODO: Test rwx gu t
-testing "" "$C '' || echo yes" "yes\n" "" ""
-testing "" "$C a && echo yes" "yes\n" "" ""
-testing "-n" "$C -n '' || echo yes" "yes\n" "" ""
-testing "-n2" "$C -n a && echo yes" "yes\n" "" ""
-testing "-z" "$C -z '' && echo yes" "yes\n" "" ""
-testing "-z2" "$C -z a || echo yes" "yes\n" "" ""
-testing "" "$C a = b || echo yes" "yes\n" "" ""
-testing "" "$C '' = '' && echo yes" "yes\n" "" ""
-testing "a != b" "$C a != b && echo yes" "yes\n" "" ""
-testing "a != b" "$C a != a || echo yes" "yes\n" "" ""
+testcmd "" "'' || echo yes" "yes\n" "" ""
+testcmd "" "a && echo yes" "yes\n" "" ""
+testcmd "-n" "-n '' || echo yes" "yes\n" "" ""
+testcmd "-n2" "-n a && echo yes" "yes\n" "" ""
+testcmd "-z" "-z '' && echo yes" "yes\n" "" ""
+testcmd "-z2" "-z a || echo yes" "yes\n" "" ""
+testcmd "" "a = b || echo yes" "yes\n" "" ""
+testcmd "" "'' = '' && echo yes" "yes\n" "" ""
+testcmd "a != b" "a != b && echo yes" "yes\n" "" ""
+testcmd "a != b" "a != a || echo yes" "yes\n" "" ""
arith_test()
{
@@ -80,3 +80,9 @@ testing "-le" "arith_test -le" "le" "" ""
# -e == -a -o -d != -o
# \( "x" \) -a \) == \)
# \( ! ! ! -e \) \)
+
+# // () -a (() -a () -o ()) -o ()
+# // x -a ( x -o x ) -a x
+# // x -o ( x -a x ) -a x -o x
+
+# trailing ! and (