summaryrefslogtreecommitdiff
path: root/tests/t0201-gpt.sh
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-11-29 18:05:31 +0100
committerJim Meyering <meyering@redhat.com>2011-11-29 18:06:07 +0100
commit70bb8cb43f1e5dfa568849236b8368c65659832a (patch)
tree6eac682ff24f6bcec0e5bb2c9e835b33cbeee7e5 /tests/t0201-gpt.sh
parent0e949391543b49e9d7b3a9a2c3682e7faaaa2285 (diff)
downloadparted-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/t0201-gpt.sh')
-rwxr-xr-xtests/t0201-gpt.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/t0201-gpt.sh b/tests/t0201-gpt.sh
index 60f284e..f282250 100755
--- a/tests/t0201-gpt.sh
+++ b/tests/t0201-gpt.sh
@@ -26,7 +26,7 @@ dd if=/dev/null of=$dev seek=4001 2> /dev/null || fail=1
# create a GPT partition table
parted -s $dev mklabel gpt > out 2>&1 || fail=1
# expect no output
-compare out /dev/null || fail=1
+compare /dev/null out || fail=1
# shrink the backing file
dd if=/dev/null of=$dev seek=4000 2> /dev/null || fail=1
@@ -34,6 +34,6 @@ dd if=/dev/null of=$dev seek=4000 2> /dev/null || fail=1
# create a new GPT table on top of the shrunken backing file
parted -s $dev mklabel gpt > out 2>&1 || fail=1
# expect no output
-compare out /dev/null || fail=1
+compare /dev/null out || fail=1
Exit $fail