diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-29 18:05:31 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-29 18:06:07 +0100 |
commit | 70bb8cb43f1e5dfa568849236b8368c65659832a (patch) | |
tree | 6eac682ff24f6bcec0e5bb2c9e835b33cbeee7e5 /tests/t8001-loop-blkpg.sh | |
parent | 0e949391543b49e9d7b3a9a2c3682e7faaaa2285 (diff) | |
download | parted-70bb8cb43f1e5dfa568849236b8368c65659832a.tar.gz |
tests: use "compare exp out", not "compare out exp"
Likewise, when an empty file is expected, use "compare /dev/null out",
not "compare out /dev/null". I.e., specify the expected/desired contents
via the first file name. Prompted by a suggestion from Bruno Haible
in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154
Run these commands:
git grep -l -E 'compare [^ ]+ exp' \
|xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/'
git grep -l -E 'compare [^ ]+ /dev/null' \
|xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,'
Diffstat (limited to 'tests/t8001-loop-blkpg.sh')
-rwxr-xr-x | tests/t8001-loop-blkpg.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/t8001-loop-blkpg.sh b/tests/t8001-loop-blkpg.sh index 08d8f47..20bbdf5 100755 --- a/tests/t8001-loop-blkpg.sh +++ b/tests/t8001-loop-blkpg.sh @@ -43,7 +43,7 @@ test -z "$loopdev" && fail=1 # Expect this to succeed parted -s "$loopdev" mklabel msdos > err 2>&1 || fail=1 -compare err /dev/null || fail=1 # expect no output +compare /dev/null err || fail=1 # expect no output # Create a partition parted -s "$loopdev" mkpart primary 1M 2M > err 2>&1 || fail=1 |