diff options
-rwxr-xr-x | tests/basic | 2 | ||||
-rwxr-xr-x | tests/binary | 2 | ||||
-rwxr-xr-x | tests/excess-slash | 4 | ||||
-rwxr-xr-x | tests/function-line-vs-leading-space | 4 | ||||
-rwxr-xr-x | tests/label-vs-func | 4 | ||||
-rwxr-xr-x | tests/no-newline-at-eof | 8 | ||||
-rwxr-xr-x | tests/stdin | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/tests/basic b/tests/basic index c1475b3..45b9c9c 100755 --- a/tests/basic +++ b/tests/basic @@ -36,7 +36,7 @@ for opt in '' -u -c; do diff $opt a b > out 2> err; test $? = 1 || fail=1 # Remove date and time. sed -e 's/^\([-+*][-+*][-+*] [^ ]*\) .*/\1/' out > k; mv k out - compare out exp-$(echo $opt|tr ' ' _) || fail=1 + compare exp-$(echo $opt|tr ' ' _) out || fail=1 done Exit $fail diff --git a/tests/binary b/tests/binary index e163f01..02c71a3 100755 --- a/tests/binary +++ b/tests/binary @@ -12,6 +12,6 @@ printf '\0'|diff - /dev/null > out 2> err # diff must exit with status 2, stdout as above, and no stderr. test $? = 2 || fail=1 compare out out-exp || fail=1 -compare err /dev/null || fail=1 +compare /dev/null err || fail=1 Exit $fail diff --git a/tests/excess-slash b/tests/excess-slash index 32ffc89..22c2060 100755 --- a/tests/excess-slash +++ b/tests/excess-slash @@ -11,8 +11,8 @@ fail=0 diff -r a b/ > out 2> err && fail=1 # expect no stderr -compare err /dev/null || fail=1 +compare /dev/null err || fail=1 -compare out expected-out || fail=1 +compare expected-out out || fail=1 Exit $fail diff --git a/tests/function-line-vs-leading-space b/tests/function-line-vs-leading-space index 1541365..572427c 100755 --- a/tests/function-line-vs-leading-space +++ b/tests/function-line-vs-leading-space @@ -57,9 +57,9 @@ test $? = 1 || fail=1 sed -n '3,$p' out > k && mv k out || fail=1 -compare out exp || fail=1 +compare exp out || fail=1 # expect empty stderr -compare err /dev/null || fail=1 +compare /dev/null err || fail=1 Exit $fail diff --git a/tests/label-vs-func b/tests/label-vs-func index bb2873e..2de61f7 100755 --- a/tests/label-vs-func +++ b/tests/label-vs-func @@ -23,9 +23,9 @@ diff -p -u0 a b > out 2> err; test $? = 1 || fail=1 tail -3 out > k && mv k out || fail=1 -compare out exp || fail=1 +compare exp out || fail=1 # expect empty stderr -compare err /dev/null || fail=1 +compare /dev/null err || fail=1 Exit $fail diff --git a/tests/no-newline-at-eof b/tests/no-newline-at-eof index 6052206..14d5f49 100755 --- a/tests/no-newline-at-eof +++ b/tests/no-newline-at-eof @@ -35,9 +35,9 @@ diff $opt -U1 a b > out 2> err test $? = 1 || fail=1 sed -n '/^@@/,$p' out > k && mv k out || fail=1 -compare out exp || fail=1 +compare exp out || fail=1 # expect empty stderr -compare err /dev/null || fail=1 +compare /dev/null err || fail=1 # Repeat, but with a newline at the end of "a". echo >> a @@ -46,8 +46,8 @@ diff $opt -U1 a b > out 2> err test $? = 1 || fail=1 sed -n '/^@@/,$p' out > k && mv k out || fail=1 -compare out exp2 || fail=1 +compare exp2 out || fail=1 # expect empty stderr -compare err /dev/null || fail=1 +compare /dev/null err || fail=1 Exit $fail diff --git a/tests/stdin b/tests/stdin index 1f006a1..295e98d 100755 --- a/tests/stdin +++ b/tests/stdin @@ -19,6 +19,6 @@ echo b > b diff -u - b < a > out 2> err; test $? = 1 || fail=1 # Remove date and time. sed -e 's/^\([-+*][-+*][-+*] [^ ]*\) .*/\1/' out > k; mv k out -compare out exp || fail=1 +compare exp out || fail=1 Exit $fail |