summaryrefslogtreecommitdiff
path: root/tests/dd/misc.sh
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
commit71cd8e3a743046573744123777061b64881bf372 (patch)
tree82522befe647f4fff186a5630cad0cad33f8ef53 /tests/dd/misc.sh
parentc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff)
downloadcoreutils-upstream.tar.gz
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'tests/dd/misc.sh')
-rwxr-xr-xtests/dd/misc.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/dd/misc.sh b/tests/dd/misc.sh
index f877fddf..bc5fb37e 100755
--- a/tests/dd/misc.sh
+++ b/tests/dd/misc.sh
@@ -2,7 +2,7 @@
# Ensure dd treats '--' properly.
# Also test some flag values.
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2015 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
@@ -35,9 +35,12 @@ dd status=none if=$tmp_in of=/dev/null 2> err || fail=1
compare /dev/null err || fail=1
dd status=none if=$tmp_in skip=2 of=/dev/null 2> err || fail=1
compare /dev/null err || fail=1
-# check status=none is cumulative with status=noxfer
-dd status=none status=noxfer if=$tmp_in of=/dev/null 2> err || fail=1
+# check later status=none overrides earlier status=noxfer
+dd status=noxfer status=none if=$tmp_in of=/dev/null 2> err || fail=1
compare /dev/null err || fail=1
+# check later status=noxfer overrides earlier status=none
+dd status=none status=noxfer if=$tmp_in of=/dev/null 2> err || fail=1
+compare /dev/null err && fail=1
dd if=$tmp_in of=$tmp_out 2> /dev/null || fail=1
compare $tmp_in $tmp_out || fail=1
@@ -58,12 +61,12 @@ case $(cat /dev/stdin <$tmp_in 2>/dev/null) in
esac
if dd iflag=nofollow if=$tmp_in count=0 2> /dev/null; then
- dd iflag=nofollow if=$tmp_sym count=0 2> /dev/null && fail=1
+ returns_ 1 dd iflag=nofollow if=$tmp_sym count=0 2> /dev/null || fail=1
fi
if dd iflag=directory if=. count=0 2> /dev/null; then
dd iflag=directory count=0 <. 2> /dev/null || fail=1
- dd iflag=directory count=0 <$tmp_in 2> /dev/null && fail=1
+ returns_ 1 dd iflag=directory count=0 <$tmp_in 2> /dev/null || fail=1
fi
old_ls=$(ls -u --full-time $tmp_in)
@@ -84,8 +87,8 @@ EOF
fi
if dd oflag=nolinks if=$tmp_in of=$tmp_out 2> /dev/null; then
- dd iflag=nolinks if=$tmp_in > /dev/null 2>&1 && fail=1
- dd iflag=nolinks < $tmp_in > /dev/null 2>&1 && fail=1
+ returns_ 1 dd iflag=nolinks if=$tmp_in > /dev/null 2>&1 || fail=1
+ returns_ 1 dd iflag=nolinks < $tmp_in > /dev/null 2>&1 || fail=1
dd oflag=nolinks < $tmp_in > $tmp_out 2>&1 || fail=1
fi