aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-03-18 20:43:04 -0700
committerRob Landley <rob@landley.net>2019-03-18 23:29:59 -0500
commitb1562a6fda7eb43d874890e6700a9fa3f4478984 (patch)
treeeb9da243111cad1ca6b4da354b3fa0425d392aaf /tests
parent94e80bb457145c8af1cbda4288b9fb799979b297 (diff)
downloadtoybox-b1562a6fda7eb43d874890e6700a9fa3f4478984.tar.gz
diff: use TOYFLAG_ARGFAIL.
This one with a little cleanup of unnecessary duplication.
Diffstat (limited to 'tests')
-rw-r--r--tests/diff.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/diff.test b/tests/diff.test
index ce51f1e8..98477587 100644
--- a/tests/diff.test
+++ b/tests/diff.test
@@ -5,6 +5,11 @@
seq 10 > left
seq 11 > right
+testing "unknown argument" 'diff --oops left right 2>/dev/null ; echo $?' "2\n" "" ""
+testing "missing" 'diff missing1 missing2 2>/dev/null ; echo $?' "2\n" "" ""
+
+testing "- -" 'diff - - ; echo $?' "0\n" "" "whatever"
+
expected='--- lll
+++ rrr
@@ -8,3 +8,4 @@
@@ -27,4 +32,4 @@ mkdir -p tree1 tree2
echo foo > tree1/file
echo food > tree2/file
-testing "simple" "diff -r -L tree1/file -L tree2/file tree1 tree2 |tee out" "$expected" "" ""
+testing "-r" "diff -r -L tree1/file -L tree2/file tree1 tree2 |tee out" "$expected" "" ""