OSDN Git Service

tests: use "compare exp out", not "compare out exp"
authorJim Meyering <meyering@redhat.com>
Tue, 29 Nov 2011 17:05:31 +0000 (18:05 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 29 Nov 2011 17:06:07 +0000 (18:06 +0100)
commit70bb8cb43f1e5dfa568849236b8368c65659832a
tree6eac682ff24f6bcec0e5bb2c9e835b33cbeee7e5
parent0e949391543b49e9d7b3a9a2c3682e7faaaa2285
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,'
43 files changed:
tests/t0000-basic.sh
tests/t0001-tiny.sh
tests/t0010-script-no-ctrl-chars.sh
tests/t0100-print.sh
tests/t0101-print-empty.sh
tests/t0200-gpt.sh
tests/t0201-gpt.sh
tests/t0202-gpt-pmbr.sh
tests/t0203-gpt-tiny-device-abort.sh
tests/t0207-IEC-binary-notation.sh
tests/t0208-mkpart-end-in-IEC.sh
tests/t0210-gpt-resized-partition-entry-array.sh
tests/t0220-gpt-msftres.sh
tests/t0300-dos-on-gpt.sh
tests/t0400-loop-clobber-infloop.sh
tests/t1100-busy-label.sh
tests/t1101-busy-partition.sh
tests/t2200-dos-label-recog.sh
tests/t2201-pc98-label-recog.sh
tests/t2300-dos-label-extended-bootcode.sh
tests/t2310-dos-extended-2-sector-min-offset.sh
tests/t2400-dos-hfs-partition-type.sh
tests/t2500-probe-corrupt-hfs.sh
tests/t3300-palo-prep.sh
tests/t3310-flags.sh
tests/t3400-whole-disk-FAT-partition.sh
tests/t4000-sun-raid-type.sh
tests/t4001-sun-vtoc.sh
tests/t4100-dvh-partition-limits.sh
tests/t4100-msdos-partition-limits.sh
tests/t4100-msdos-starting-sector.sh
tests/t4200-partprobe.sh
tests/t6000-dm.sh
tests/t8000-loop.sh
tests/t8001-loop-blkpg.sh
tests/t9010-big-sector.sh
tests/t9020-alignment.sh
tests/t9021-maxima.sh
tests/t9022-one-unit-snap.sh
tests/t9023-value-lt-one.sh
tests/t9030-align-check.sh
tests/t9040-many-partitions.sh
tests/t9041-undetected-in-use-16th-partition.sh