summaryrefslogtreecommitdiff
path: root/tests/dd/misc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-07 14:28:47 +0200
committerJim Meyering <jim@meyering.net>2007-09-15 08:40:38 +0200
commitceb5b04614dfc6037c0a3ac6205b6b3c072bc4cb (patch)
tree4226b1c229e1c1b66ed7ae2b39856cf5b303ee12 /tests/dd/misc
parent33173e867aa45b7f88551551da51e36875582813 (diff)
downloadcoreutils-ceb5b04614dfc6037c0a3ac6205b6b3c072bc4cb.tar.xz
Convert tests/dd/*, too.
Diffstat (limited to 'tests/dd/misc')
-rwxr-xr-xtests/dd/misc22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/dd/misc b/tests/dd/misc
index dc77e8b60..aea949109 100755
--- a/tests/dd/misc
+++ b/tests/dd/misc
@@ -2,7 +2,7 @@
# Ensure dd treats `--' properly.
# Also test some flag values.
-# Copyright (C) 1999, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2004-2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,16 +17,18 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-tmp_in=dd-in.$$
-tmp_in2=dd-in2.$$
-tmp_sym=dd-sym.$$
-tmp_out=dd-out.$$
-
if test "$VERBOSE" = yes; then
set -x
dd --version
fi
+. $srcdir/../test-lib.sh
+
+tmp_in=dd-in.$$
+tmp_in2=dd-in2.$$
+tmp_sym=dd-sym.$$
+tmp_out=dd-out.$$
+
fail=0
warn=0
test_failure=0
@@ -39,14 +41,14 @@ if test $test_failure = 1; then
fi
dd if=$tmp_in of=$tmp_out 2> /dev/null || fail=1
-cmp $tmp_in $tmp_out || fail=1
+compare $tmp_in $tmp_out || fail=1
rm $tmp_out
dd -- if=$tmp_in of=$tmp_out 2> /dev/null || fail=1
-cmp $tmp_in $tmp_out || fail=1
+compare $tmp_in $tmp_out || fail=1
if dd oflag=append if=$tmp_in of=$tmp_out 2> /dev/null; then
- cmp $tmp_in $tmp_out || fail=1
+ compare $tmp_in $tmp_out || fail=1
fi
if dd iflag=nofollow if=$tmp_in count=0 2> /dev/null; then
@@ -84,7 +86,5 @@ fi
outbytes=`echo x | dd bs=3 ibs=10 obs=10 conv=sync 2>/dev/null | wc -c`
test "$outbytes" -eq 3 || fail=1
-rm -f $tmp_in $tmp_in2 $tmp_sym $tmp_out || fail=1
-
test $fail -eq 0 && fail=$warn
exit $fail