]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: use "compare exp out", not "compare out exp"
authorJim Meyering <meyering@redhat.com>
Tue, 22 Nov 2011 09:08:04 +0000 (10:08 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 22 Nov 2011 09:35:03 +0000 (10:35 +0100)
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/(compare) (\S+) (exp\S*)/$1 $3 $2/'
    git grep -l -E 'compare [^ ]+ /dev/null' \
      |xargs perl -pi -e 's/(compare) (\S+) (\/dev\/null)/$1 $3 $2/'

* tests/chgrp/no-x: As above.
* tests/chmod/no-x: Likewise.
* tests/chmod/silent: Likewise.
* tests/chmod/thru-dangling: Likewise.
* tests/chown/basic: Likewise.
* tests/chown/deref: Likewise.
* tests/chown/preserve-root: Likewise.
* tests/cp/abuse: Likewise.
* tests/cp/backup-is-src: Likewise.
* tests/cp/cp-a-selinux: Likewise.
* tests/cp/cp-mv-enotsup-xattr: Likewise.
* tests/cp/fail-perm: Likewise.
* tests/cp/into-self: Likewise.
* tests/cp/proc-zero-len: Likewise.
* tests/cp/src-base-dot: Likewise.
* tests/cp/thru-dangling: Likewise.
* tests/dd/reblock: Likewise.
* tests/dd/unblock-sync: Likewise.
* tests/du/2g: Likewise.
* tests/du/8gb: Likewise.
* tests/du/basic: Likewise.
* tests/du/bigtime: Likewise.
* tests/du/deref-args: Likewise.
* tests/du/exclude: Likewise.
* tests/du/files0-from-dir: Likewise.
* tests/du/hard-link: Likewise.
* tests/du/inacc-dest: Likewise.
* tests/du/inacc-dir: Likewise.
* tests/du/long-sloop: Likewise.
* tests/du/max-depth: Likewise.
* tests/du/move-dir-while-traversing: Likewise.
* tests/du/no-deref: Likewise.
* tests/du/no-x: Likewise.
* tests/du/one-file-system: Likewise.
* tests/du/slash: Likewise.
* tests/du/trailing-slash: Likewise.
* tests/install/strip-program: Likewise.
* tests/ln/hard-backup: Likewise.
* tests/ls/block-size: Likewise.
* tests/ls/color-clear-to-eol: Likewise.
* tests/ls/color-dtype-dir: Likewise.
* tests/ls/color-norm: Likewise.
* tests/ls/dangle: Likewise.
* tests/ls/dired: Likewise.
* tests/ls/file-type: Likewise.
* tests/ls/follow-slink: Likewise.
* tests/ls/infloop: Likewise.
* tests/ls/m-option: Likewise.
* tests/ls/no-arg: Likewise.
* tests/ls/recursive: Likewise.
* tests/ls/rt-1: Likewise.
* tests/ls/stat-dtype: Likewise.
* tests/ls/stat-failed: Likewise.
* tests/ls/stat-free-symlinks: Likewise.
* tests/ls/x-option: Likewise.
* tests/misc/arch: Likewise.
* tests/misc/cat-buf: Likewise.
* tests/misc/cat-proc: Likewise.
* tests/misc/chcon: Likewise.
* tests/misc/csplit: Likewise.
* tests/misc/df-P: Likewise.
* tests/misc/fmt-long-line: Likewise.
* tests/misc/groups-dash: Likewise.
* tests/misc/groups-version: Likewise.
* tests/misc/head-pos: Likewise.
* tests/misc/nl: Likewise.
* tests/misc/od-N: Likewise.
* tests/misc/od-multiple-t: Likewise.
* tests/misc/od-x8: Likewise.
* tests/misc/printf: Likewise.
* tests/misc/printf-hex: Likewise.
* tests/misc/pwd-option: Likewise.
* tests/misc/readlink-fp-loop: Likewise.
* tests/misc/runcon-no-reorder: Likewise.
* tests/misc/seq-long-double: Likewise.
* tests/misc/sort-NaN-infloop: Likewise.
* tests/misc/sort-benchmark-random: Likewise.
* tests/misc/sort-debug-keys: Likewise.
* tests/misc/sort-float: Likewise.
* tests/misc/sort-merge-fdlimit: Likewise.
* tests/misc/sort-unique-segv: Likewise.
* tests/misc/stat-hyphen: Likewise.
* tests/misc/stat-slash: Likewise.
* tests/misc/stdbuf: Likewise.
* tests/misc/sum-sysv: Likewise.
* tests/misc/tac-2-nonseekable: Likewise.
* tests/misc/tac-continue: Likewise.
* tests/misc/tr-case-class: Likewise.
* tests/misc/truncate-fail-diag: Likewise.
* tests/misc/wc-files0: Likewise.
* tests/mkdir/selinux: Likewise.
* tests/mv/backup-dir: Likewise.
* tests/mv/backup-is-src: Likewise.
* tests/mv/diag: Likewise.
* tests/mv/dir2dir: Likewise.
* tests/mv/dup-source: Likewise.
* tests/mv/force: Likewise.
* tests/mv/hard-verbose: Likewise.
* tests/mv/i-link-no: Likewise.
* tests/mv/into-self: Likewise.
* tests/mv/into-self-2: Likewise.
* tests/mv/into-self-3: Likewise.
* tests/mv/mv-special-1: Likewise.
* tests/mv/part-fail: Likewise.
* tests/mv/perm-1: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/mv/trailing-slash: Likewise.
* tests/rm/rm1: Likewise.
* tests/rm/rm2: Likewise.
* tests/rm/cycle: Likewise.
* tests/rm/dir-no-w: Likewise.
* tests/rm/dir-nonrecur: Likewise.
* tests/rm/fail-2eperm: Likewise.
* tests/rm/fail-eacces: Likewise.
* tests/rm/i-never: Likewise.
* tests/rm/inaccessible: Likewise.
* tests/rm/interactive-always: Likewise.
* tests/rm/interactive-once: Likewise.
* tests/rm/isatty: Likewise.
* tests/rm/one-file-system: Likewise.
* tests/rm/rm3: Likewise.
* tests/rm/rm5: Likewise.
* tests/rm/unread2: Likewise.
* tests/rm/v-slash: Likewise.
* tests/sample-test: Likewise.
* tests/split/b-chunk: Likewise.
* tests/split/fail: Likewise.
* tests/split/l-chunk: Likewise.
* tests/split/lines: Likewise.
* tests/split/r-chunk: Likewise.
* tests/split/suffix-length: Likewise.
* tests/tail-2/big-4gb: Likewise.
* tests/tail-2/follow-name: Likewise.
* tests/tail-2/follow-stdin: Likewise.
* tests/tail-2/pipe-f: Likewise.
* tests/tail-2/pipe-f2: Likewise.
* tests/tail-2/start-middle: Likewise.
* tests/touch/60-seconds: Likewise.
* tests/touch/fail-diag: Likewise.
* tests/touch/not-owner: Likewise.
* tests/touch/relative: Likewise.

141 files changed:
tests/chgrp/no-x
tests/chmod/no-x
tests/chmod/silent
tests/chmod/thru-dangling
tests/chown/basic
tests/chown/deref
tests/chown/preserve-root
tests/cp/abuse
tests/cp/backup-is-src
tests/cp/cp-a-selinux
tests/cp/cp-mv-enotsup-xattr
tests/cp/fail-perm
tests/cp/into-self
tests/cp/proc-zero-len
tests/cp/src-base-dot
tests/cp/thru-dangling
tests/dd/reblock
tests/dd/unblock-sync
tests/du/2g
tests/du/8gb
tests/du/basic
tests/du/bigtime
tests/du/deref-args
tests/du/exclude
tests/du/files0-from-dir
tests/du/hard-link
tests/du/inacc-dest
tests/du/inacc-dir
tests/du/long-sloop
tests/du/max-depth
tests/du/move-dir-while-traversing
tests/du/no-deref
tests/du/no-x
tests/du/one-file-system
tests/du/slash
tests/du/trailing-slash
tests/install/strip-program
tests/ln/hard-backup
tests/ls/block-size
tests/ls/color-clear-to-eol
tests/ls/color-dtype-dir
tests/ls/color-norm
tests/ls/dangle
tests/ls/dired
tests/ls/file-type
tests/ls/follow-slink
tests/ls/infloop
tests/ls/m-option
tests/ls/no-arg
tests/ls/recursive
tests/ls/rt-1
tests/ls/stat-dtype
tests/ls/stat-failed
tests/ls/stat-free-symlinks
tests/ls/x-option
tests/misc/arch
tests/misc/cat-buf
tests/misc/cat-proc
tests/misc/chcon
tests/misc/csplit
tests/misc/df-P
tests/misc/fmt-long-line
tests/misc/groups-dash
tests/misc/groups-version
tests/misc/head-pos
tests/misc/nl
tests/misc/od-N
tests/misc/od-multiple-t
tests/misc/od-x8
tests/misc/printf
tests/misc/printf-hex
tests/misc/pwd-option
tests/misc/readlink-fp-loop
tests/misc/runcon-no-reorder
tests/misc/seq-long-double
tests/misc/sort-NaN-infloop
tests/misc/sort-benchmark-random
tests/misc/sort-debug-keys
tests/misc/sort-float
tests/misc/sort-merge-fdlimit
tests/misc/sort-unique-segv
tests/misc/stat-hyphen
tests/misc/stat-slash
tests/misc/stdbuf
tests/misc/sum-sysv
tests/misc/tac-2-nonseekable
tests/misc/tac-continue
tests/misc/tr-case-class
tests/misc/truncate-fail-diag
tests/misc/wc-files0
tests/mkdir/selinux
tests/mv/backup-dir
tests/mv/backup-is-src
tests/mv/diag
tests/mv/dir2dir
tests/mv/dup-source
tests/mv/force
tests/mv/hard-verbose
tests/mv/i-link-no
tests/mv/into-self
tests/mv/into-self-2
tests/mv/into-self-3
tests/mv/mv-special-1
tests/mv/part-fail
tests/mv/perm-1
tests/mv/sticky-to-xpart
tests/mv/trailing-slash
tests/rm/cycle
tests/rm/dir-no-w
tests/rm/dir-nonrecur
tests/rm/fail-2eperm
tests/rm/fail-eacces
tests/rm/i-never
tests/rm/inaccessible
tests/rm/interactive-always
tests/rm/interactive-once
tests/rm/isatty
tests/rm/one-file-system
tests/rm/rm1
tests/rm/rm2
tests/rm/rm3
tests/rm/rm5
tests/rm/unread2
tests/rm/v-slash
tests/sample-test
tests/split/b-chunk
tests/split/fail
tests/split/l-chunk
tests/split/lines
tests/split/r-chunk
tests/split/suffix-length
tests/tail-2/big-4gb
tests/tail-2/follow-name
tests/tail-2/follow-stdin
tests/tail-2/pipe-f
tests/tail-2/pipe-f2
tests/tail-2/start-middle
tests/touch/60-seconds
tests/touch/fail-diag
tests/touch/not-owner
tests/touch/relative

index 2555c4532a056396cb134a72030fb63ea02d1323..9a2470be04965185214fe51e26173cb6330671d7 100755 (executable)
@@ -49,6 +49,6 @@ cat <<EOF > exp
 $prog: \`d/no-x': Permission denied
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index f45c4466e774d8879206483b2881aad56dbe56ff..534eec13364e6cfeb72b901bc3ac57b4c3174588 100755 (executable)
@@ -44,7 +44,7 @@ cat <<EOF > exp
 $prog: \`d/no-x': Permission denied
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 cd a
 # This will fail with ``chmod: fts_read failed: Permission denied''
index 1745299debd2845241197abfe03d1ccace32bc28..e79c58f559066a77d170f4b19439d487294a01d9 100755 (executable)
@@ -24,6 +24,6 @@ chgrp -f 0   no-such 2>> out && fail=1
 chown -f 0:0 no-such 2>> out && fail=1
 touch exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 38187d0023e1c9de7a0ba898dd2623254b101c88..d61b6bde5e9e9d84ab26923adb39b2c069d0d2bb 100755 (executable)
@@ -26,6 +26,6 @@ ln -s non-existent dangle || framework_failure_
 chmod 644 dangle 2> out && fail=1
 
 echo "chmod: cannot operate on dangling symlink \`dangle'" > exp
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 102f17c79b40f340245eed4f2340b19e702f1028..8df8399af2e7e15c6441a2255cb33f7cbfa34b2c 100755 (executable)
@@ -31,12 +31,12 @@ set _ `ls -n f`; shift; test "$3:$4" = 0:1 || fail=1
 # Note we output a name even though an id was specified.
 chown -v --from=42 43 f > out || fail=1
 printf "ownership of \`f' retained as `id -nu`\n" > exp
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Ensure diagnostics work for non existent files.
 chown -v 0 nf > out && fail=1
 printf "failed to change ownership of \`nf' to 0\n" > exp
-compare out exp || fail=1
+compare exp out || fail=1
 
 chown --from=0:1 2:010 f || fail=1
 
index c228bde801f7f17fb8a6cdbed9b3a18c26d0dd59..02175ff7076d40dc2827dd9078fac08b460f96aa 100755 (executable)
@@ -33,6 +33,6 @@ cat <<\EOF > exp || fail=1
 chown: cannot dereference `dangle'
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 072cc831a77fb11e6d6eedaa41c2dc665bdddfa1..3ee30491475d3d611840dab739963bde30e0425b 100755 (executable)
@@ -61,6 +61,6 @@ chgrp: it is dangerous to operate recursively on `d/slink-to-root' (same as `/')
 chgrp: use --no-preserve-root to override this failsafe
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 43b7df0d9911f9b5d0e6957e505b75d99cb25433..1573ed5b0891b156d8a6e7452266dcd9ac2a8461 100755 (executable)
@@ -34,7 +34,7 @@ for i in dangling-dest existing-dest; do
 
   cp -dR a/1 b/1 c 2> out && fail=1
 
-  compare out exp || fail=1
+  compare exp out || fail=1
 
   # When the destination is a dangling symlink,
   # ensure that cp does not create it.
index bb6478940e8d5fbdcb2ce9610374436b6a1f94cd..9547c4e7e7d861b47a6ffa56e37e6589cb2285fe 100755 (executable)
@@ -31,6 +31,6 @@ cat > exp <<\EOF
 XXX: backing up `a' would destroy source;  `a~' not copied
 EOF
 
-compare out2 exp || fail=1
+compare exp out2 || fail=1
 
 Exit $fail
index 0f9c1493848096f9ea260bcdc4d72ec219aecb1b..7ef24d801c4ed92925c2d3faeee0677be3b5d8ce 100755 (executable)
@@ -100,7 +100,7 @@ cp --preserve=context f g 2> out && fail=1
 test -s g && fail=1
 sed "s/ .g' to .*//" out > k
 mv k out
-compare out exp || fail=1
+compare exp out || fail=1
 
 rm -f g
 echo > g
@@ -110,6 +110,6 @@ cp -a --preserve=context f g 2> out2 && fail=1
 test -s g && fail=1
 sed "s/ .g' to .*//" out2 > k
 mv k out2
-compare out2 exp || fail=1
+compare exp out2 || fail=1
 
 Exit $fail
index 32798d2fc5ac1a0b632fc4e5d08154da3506ff3b..f30358136da3ce470ada12c0f2601551ba760cd0 100755 (executable)
@@ -98,7 +98,7 @@ cp: cannot preserve extended attributes, cp is built without xattr support
 EOF
 fi
 
-compare err exp     || fail=1
+compare exp err     || fail=1
 
 rm -f err noxattr/a
 
index 404c83e39cb3b52fe6e1c5739d0fb2e4350a625b..d05189785a51ef6b07b7d9714dc8725eb60a0611 100755 (executable)
@@ -47,11 +47,11 @@ cp F symlink 2> out && fail=1
 #   ...: The file access permissions do not allow the specified action.
 # to the expected one:
 sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
-compare out exp || fail=1
+compare exp out || fail=1
 
 cp --target-directory=symlink F 2> out && fail=1
 sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
-compare out exp || fail=1
+compare exp out || fail=1
 
 chmod 700 D
 
index deb5a53258722fa9cef6a550b02ebe2806d16937..91c3a5a855e7ac7119c9936aa7743c8d975ac7bd 100755 (executable)
@@ -52,6 +52,6 @@ cp: cannot copy a directory, `dir', into itself, `dir/dir'
 EOF
 #'
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 53abc43f9fc07a413accb70fb8cc9abc567615c7..cc6fd0fbcea1f441c46ddf94a481a191e33d6038 100755 (executable)
@@ -35,6 +35,6 @@ cp $f exp || fail=1
 test -s out && { rm -f out; echo nonempty > out; }
 test -s exp && { rm -f exp; echo nonempty > exp; }
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 069c1935cb1524fcbd9e28b860c0e3b2b82fb026..4ec39a873e7512c31552fd27c4a4ef04fe56b0e9 100755 (executable)
@@ -27,6 +27,6 @@ cp --verbose -ab ../x/. . > out 2>&1 || fail=1
 cat <<\EOF > exp || fail=1
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 62f111587d4dc3c3b518fce44fbc353790a02378..1c5c12d4c1133163ba1791d11f9836fb37177c22 100755 (executable)
@@ -29,13 +29,13 @@ echo "cp: not writing through dangling symlink \`dangle'" \
 # Starting with 6.9.90, this usage fails, by default:
 cp f dangle > err 2>&1 && fail=1
 
-compare err exp-err || fail=1
+compare exp-err err || fail=1
 test -f no-such && fail=1
 
 # But you can set POSIXLY_CORRECT to get the historical behavior.
 env POSIXLY_CORRECT=1 cp f dangle > out 2>&1 || fail=1
 cat no-such >> out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 558d729e1127dffde6599cc3e0e259b45774336f..59e61fa2710be75b389917585743394fc4a31cf0 100755 (executable)
@@ -50,7 +50,7 @@ dd_reblock_1()
   (printf 'ab'; sleep $delay; printf 'cd') > dd.fifo
   wait #for dd to complete
   sed 's/,.*//' err > k && mv k err
-  compare err exp-reblock
+  compare exp-reblock err
 }
 
 retry_delay_ dd_reblock_1 .1 6 || fail=1
@@ -64,7 +64,7 @@ dd_reblock_2()
   (printf 'ab'; sleep $delay; printf 'cd') > dd.fifo
   wait #for dd to complete
   sed 's/,.*//' err > k && mv k err
-  compare err exp-no-reblock
+  compare exp-no-reblock err
 }
 
 retry_delay_ dd_reblock_2 .1 6 || fail=1
index a6fd4a52cd51ca090219f4ded4f03d9cdc8ab988..f9e01e041c1474eaf9341df6bca4bae6ae2e4d4a 100755 (executable)
@@ -30,6 +30,6 @@ cat <<\EOF > exp || fail=1
 xx
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 280ba30f8c3c9f960c68f76f0df769baf697301e..fe58767741dfe1b682e4f4dc3dc757b7e84d504b 100755 (executable)
@@ -64,6 +64,6 @@ cat <<\EOF > exp || fail=1
 ~2M
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index ab283e42ec5a5e8625928ba9e13cde159e4381a3..22d09af50418123707bd76e7a9a8615ed75e32e6 100755 (executable)
@@ -48,6 +48,6 @@ cat <<\EOF > exp
 8589934592     big
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 3cb3c0d993dca581dbee1dc2c49963e880749c7d..db75ee927d17d32408e2d4920d98f3de70e29645 100755 (executable)
@@ -55,7 +55,7 @@ $a    a       # size of dir entry, a
 $tot   a
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Perform this test only if "." is on a local file system.
 # Otherwise, it would fail e.g., on an NFS-mounted Solaris ZFS file system.
@@ -83,7 +83,7 @@ $s2   d/sub
 $d1    d           # d + d/1; don't count the dir. entry for d/sub
 EOF
 
-  compare out exp || fail=1
+  compare exp out || fail=1
 fi
 
 Exit $fail
index b33b80126cd2d8bbd4938a5692d75976da19fb0c..dd69457c3fcbc525e6f462e78ed87fd63e0b6881 100755 (executable)
@@ -45,7 +45,7 @@ du --time future >out 2>err || fail=1
 # Map the number of blocks to 0.
 sed 's/^[0-9][0-9]*/0/' out > k && mv k out
 
-compare out exp || fail=1
+compare exp out || fail=1
 compare err err_ok || fail=1
 
 Exit $fail
index 474f7d06c7c4aaa144285aff45f8a7d107b77687..3c3e974258e8dc5ede05b836605cca240dd83a50 100755 (executable)
@@ -43,6 +43,6 @@ slink/
 64     slink-to-64k
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 7403f5d04edb88fd6734b0752dbdbc7484deacff..87346fba571c87378b5ae15d058e7b82b7db46e7 100755 (executable)
@@ -53,6 +53,6 @@ a/x
 a/x/y
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index fc1e1844ce9def921988e96da85751442e8ad24b..1d996c152db9f58b0fd60c17356220b0fccc42fa 100755 (executable)
@@ -33,7 +33,7 @@ for prog in du wc; do
   # The diagnostic string is usually "Is a directory" (ENOTDIR),
   # but accept a different string or errno value.
   sed 's/dir:.*/dir:/' err > k; mv k err
-  compare err exp || fail=1
+  compare exp err || fail=1
 done
 
 Exit $fail
index 71cbf51d90b226d5b098e61d9f4c842e28c0c2e2..4113898ec1d7c39eadc6986619b85e38355847a2 100755 (executable)
@@ -59,6 +59,6 @@ dir/f_
 dir
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index fac7e0ede787b8a3e459ee578e96edef94983f71..96231a013f930803e8748aafe8134fe1ff30879a 100755 (executable)
@@ -51,6 +51,6 @@ EOF
 sed "s,/c/j': ,/c': ," out > t && mv t out
 sed 's,cannot access,cannot read directory,' out > t && mv t out
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index c160fbbf50421310f7ae7f6194ce6dfc81a131cd..638fc340a6e799cdc5d96ecd5bb32c483e2d3587 100755 (executable)
@@ -27,7 +27,7 @@ chmod 0 a/sub || fail=1
 # Expect failure, ignore diagnostics.
 du -s a > out 2> /dev/null && fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Same as above, but don't use -s, so we print
 # an entry for the unreadable "sub", too.
@@ -37,6 +37,6 @@ chmod 0 a/sub || fail=1
 # Expect failure, ignore diagnostics.
 du -k a > out 2> /dev/null && fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 6c1d8d5de36316856ad1859104533ec450b4f2bc..09bd2c1c6b35e9af397b64d7144365e999997736 100755 (executable)
@@ -67,6 +67,6 @@ sed "s, .1/s/s/s/[/s]*',," out1 > out || fail=1
 
 echo "du: cannot access: $too_many" > exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 6edc73e6e73d7d3bba5efe54756f38eb71f429d4..e165d32788c2b7b910b40f6560b3b19b545b451a 100755 (executable)
@@ -25,14 +25,14 @@ du --max-depth=2 a > out 2>err || fail=1
 
 # Remove the sizes.  They vary between file systems.
 cut -f2- out > k && mv k out
-compare out exp || fail=1
-compare err /dev/null || fail=1
+compare exp out || fail=1
+compare /dev/null err || fail=1
 
 # Repeat, but use -d 1.
 printf 'a/b\na\n' > exp || framework_failure_
 du -d 1 a > out 2>err || fail=1
 cut -f2- out > k && mv k out
-compare out exp || fail=1
-compare err /dev/null || fail=1
+compare exp out || fail=1
+compare /dev/null err || fail=1
 
 Exit $fail
index d0969fecc4e5fb2a740a5ec10d7e6c20adef6f56..29a65d8d52746e2a796f000dcb122b1e5ff8babd 100755 (executable)
@@ -91,6 +91,6 @@ test $? = 1 || fail=1
 # check for the new diagnostic
 printf "du: fts_read failed: $t/3/a/b: No such file or directory\n" > exp \
   || fail=1
-compare err exp || fail=1
+compare exp err || fail=1
 
 Exit $fail
index 09a1dcc41ab0c6c2887965eb27cfbaf8a792c65a..731eb8ec50b0fd2e4f9c06e8e6bbd5c364d06fdf 100755 (executable)
@@ -28,6 +28,6 @@ cat <<\EOF > exp
 slink
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index e45f317e0bba617193ec8a2ce0ffb827f4449c66..366818be9197d137350cc5e32cdb686021e42b15 100755 (executable)
@@ -44,6 +44,6 @@ cat <<EOF > exp
 $prog: \`d/no-x': Permission denied
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 8a57c993444201ad33b2d4165277e25e628acb99..7195838bdeb7feeb39d52722b5bd4ade662ecfce 100755 (executable)
@@ -35,6 +35,6 @@ y/z
 y
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index c87dd3f3fad6d1889fdd520ebefc8634f3f64a5f..f796cc04736defc47c77e25b7c67f1de39ce323b 100755 (executable)
@@ -28,6 +28,6 @@ cat <<\EOF > exp
 /
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 7c97ccec9d16bf530a475ad0a0436a207a57f741..e22c9d628a24b6df073b1e61c90e01e012279853 100755 (executable)
@@ -42,6 +42,6 @@ slink/1
 slink
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 0f1e9fa222884811dcbaecc2ccd9ab8de9495071..ebd6a41e3c7319165df585f35912621a73abdd00 100755 (executable)
@@ -31,6 +31,6 @@ chmod a+x b || framework_failure_
 echo abc > src || fail=1
 echo aBc > exp || fail=1
 ginstall src dest -s --strip-program=./b || fail=1
-compare dest exp || fail=1
+compare exp dest || fail=1
 
 Exit $fail
index e6c9631b7c4cf3a9ed2c7384e13c67bf7941aa7e..a67fdbe350099e8a8e12383e26d55f0e8cd9d566 100755 (executable)
@@ -27,6 +27,6 @@ cat <<\EOF > exp || fail=1
 ln: `f' and `f' are the same file
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 16ede04b71faa7a081baf42ddd714c9826cf66f4..9b920f10f4c3eee86796d5c0372977cf667e0ea1 100755 (executable)
@@ -168,6 +168,6 @@ cat >exp <<'EOF'
 4 Jan  1  2001 file4096
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 164b163c79bf5584b2eb633ae16639a1af9f9600..25dfe37bb4bef533c72195e054e6ffa30f7d3b86 100755 (executable)
@@ -36,6 +36,6 @@ echo >> out || fail=1
 
 sed 's/.*T //' out > k && mv k out
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index b677240db05d10fbb2b3ee79ed4b9152a7aa738d..3d1655c0ce2010c2f649a95653628a2553eea44e 100755 (executable)
@@ -41,7 +41,7 @@ out$
 ^[[37;44msticky^[[0m$
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 rm exp
 
@@ -59,6 +59,6 @@ out$
 ^[[37;44msticky^[[0m$
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index c8691034b88553860e433c32fb2460d397d15a85..843c238247bb0eb2ce16e81a1ef489e3c4f86d4b 100755 (executable)
@@ -79,6 +79,6 @@ norm nocolor$
 norm exe$
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 35035febeae667e325e076e1c3b7dfde1818b4be..c85835f66e4535898ab8a560b28101f047541b0e 100755 (executable)
@@ -47,7 +47,7 @@ sub
 sub
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Ensure that ls -Li prints "?" as the inode of a dangling symlink.
 rm -f out
index 18cd1eaa36309f89316458f1c9e1d0dc057e85cc..2718921450e2d0f24dba911fb0af9f0868fd6628 100755 (executable)
@@ -30,6 +30,6 @@ cat <<EOF > exp
 //DIRED-OPTIONS// --quoting-style=literal
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index b722290457a1b35c1f33cc5e74587b2dc981c455..a4924ede17cc5705d88a3c5a42ac17c78d8e965b 100755 (executable)
@@ -53,13 +53,13 @@ ls --indicator-style=file-type sub > out2 || fail=1
 sed 's/[@|]$//' exp2 > exp3
 ls -p sub > out3 || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
-compare out2 exp2 || fail=1
+compare exp2 out2 || fail=1
 
-compare out3 exp3 || fail=1
+compare exp3 out3 || fail=1
 
 ls --color=auto -F sub > out || fail=1
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index cb4922b37a4e1cda98054bf42dcd81e1115283da..fba68b58fbce423df8a716fcc5f4af4831cc5fdb 100755 (executable)
@@ -55,7 +55,7 @@ link-to-dir/
 sub/link-to-dir:
 EOF
 
-compare out-L exp-L || fail=1
-compare out-FLR-sub exp-FLR-sub || fail=1
+compare exp-L out-L || fail=1
+compare exp-FLR-sub out-FLR-sub || fail=1
 
 Exit $fail
index 34d963311bc77d6a3a30fef90500837be3516f81..78ee2008ff16b5f2df69440a76300cb3cb13c19a 100755 (executable)
@@ -36,7 +36,7 @@ timeout 10 ls -RL loop >out 2>err
 # Ensure that ls exits with status 2 upon detecting a cycle
 test $? = 2 || fail=1
 
-compare err exp-err || fail=1
-compare out exp-out || fail=1
+compare exp-err err || fail=1
+compare exp-out out || fail=1
 
 Exit $fail
index 2e6ec03d2692ab9f36b48256f5c84021ce80b096..4ec2342aa2753de171f0685c989d2a4ad905bb6e 100755 (executable)
@@ -35,6 +35,6 @@ b
 0 a, 12 b
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index f61846b97367b45f6e013045590154d63b771bf1..65aa55b5713aac7f954023f8f91719a11dfecd7d 100755 (executable)
@@ -33,7 +33,7 @@ EOF
 
 ls -1 > out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 cat > exp <<\EOF
 .:
@@ -51,6 +51,6 @@ EOF
 
 ls -R1 > out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 677b5fdb226c7f75cf7e704281b7d2de96d7002f..3e0b2a0a7b16dc262064df02da1cf2955dfc006a 100755 (executable)
@@ -45,7 +45,7 @@ b:
 c:
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 rm -rf out exp
 ls -R1 x y f > out || fail=1
@@ -57,6 +57,6 @@ x:
 y:
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 05d2a039fbff7ba78586390b2911fe0fc47a942d..00090643f2698875a3abfe9b9be5b24f082def2b 100755 (executable)
@@ -32,7 +32,7 @@ a
 b
 c
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 rm -rf out exp
 ls -1rt a b c > out || fail=1
@@ -41,6 +41,6 @@ c
 b
 a
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 8ee94344f2797a82539d9f591bc9216909301be2..9b47930f5a85706d3050274a450558ac0a9f81dc 100755 (executable)
@@ -46,7 +46,7 @@ cat <<\EOF > exp || fail=1
 s@
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 rm -f out exp
 # Check for the ls -CF misaligned-columns bug:
@@ -56,6 +56,6 @@ ls -CF e > out || fail=1
 # rather than the appropriate TAB.
 printf 'a2345/\tb/\n' > exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 5a22c7bf9ec27c6cee578520470edac0cde92f46..84ffa947de20f7b7daf5af2bdb8d73eadadb1f7b 100755 (executable)
@@ -34,7 +34,7 @@ total 0
 ?????????? ? ?            ? s
 EOF
 
-sed 's/^l/?/' out | compare - exp || fail=1
+sed 's/^l/?/' out | compare exp - || fail=1
 
 # Ensure that the offsets in --dired output are accurate.
 rm -f out exp
@@ -47,6 +47,6 @@ cat <<\EOF > exp || fail=1
 //DIRED-OPTIONS// --quoting-style=literal
 EOF
 
-sed 's/^  l/  ?/' out | compare - exp || fail=1
+sed 's/^  l/  ?/' out | compare exp - || fail=1
 
 Exit $fail
index ab2011925c112932c61252e215ba68cae37c0023..87304da4dab42bdd75ba1c5a30bdfd51952bf45d 100755 (executable)
@@ -47,6 +47,6 @@ grep '^stat("x"' err && fail=1
   printf '\033[01;32mx\033[0m*\n'
 } > exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 7a451f54b134d9d316a6456d3178861de345bfe3..0730de5e51106fad4c4b657a98a26801c4c20ff0 100755 (executable)
@@ -32,6 +32,6 @@ a  b
 b  a
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 194f7f359de31a4664443288ad9498ba82106820..df45e4a19ad589d5f2dda33e4332e68253684458 100755 (executable)
@@ -24,6 +24,6 @@ require_built_ arch
 arch > out || fail=1
 uname -m > exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 348b4145016e08aaecd881658164ac8e0c803277..4bb5419b8d0c164d6662f9f2b2d23fbe9b9eef24 100755 (executable)
@@ -36,7 +36,7 @@ cat_buf_1()
   dd count=1 if=fifo > out &
   (echo 1; sleep $delay; echo 2) | cat -v > fifo
   wait # for dd to complete
-  compare out exp
+  compare exp out
 }
 
 retry_delay_ cat_buf_1 .1 6 || fail=1
index 83c1735130e55932df1d842b092ca04bb7eb77ce..2372980c3af0ebad0f9c36d6a9073b0485cb6f13 100755 (executable)
@@ -33,6 +33,6 @@ test -f $f \
 cat -E $f | sed 's/[0-9][0-9]*/D/g' | tr -d '$' > out || fail=1
 cat    $f | sed 's/[0-9][0-9]*/D/g' | tr -d '$' > exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 0f367ef897b1fe8ef4679255199ba305bdc4441c..70837af6cbace3c8c11c63a77cf557c3bd82593e 100755 (executable)
@@ -68,10 +68,10 @@ f|-robject_r|root:object_r:file_t:$range
 f|-ttmp_t|root:object_r:tmp_t:$range
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 chcon --verbose -u$u1 f > out || fail=1
 echo 'changing security context of `f'\' > exp
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 652690c5efbf1f1afdd74969d4e45b43ddedfb7d..7536bbb395481acf8ced1df299c4fe1ae5bdeaeb 100755 (executable)
@@ -28,14 +28,14 @@ cat <<EOF > exp
 0
 2
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 rm -f in out exp
 
 # Ensure that xx02 contains just two newlines.
 # This would fail due to reading from freed buffer with coreutils-5.0.91.
 printf '\n\n' > exp
 cp xx02 out || fail=1
-compare out exp || fail=1
+compare exp out || fail=1
 rm -f in out exp
 
 # csplit would infloop
@@ -45,7 +45,7 @@ cat <<EOF > exp
 0
 3
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 rm -f in out exp
 
 # `echo |csplit - 1 1' used to abort.
@@ -56,11 +56,11 @@ cat <<EOF > exp
 0
 1
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 cat <<\EOF > experr
 csplit: warning: line number `1' is the same as preceding line number
 EOF
-compare err experr || fail=1
+compare experr err || fail=1
 rm -f in out exp err experr
 
 # `echo | csplit -b '%0#6.3x' - 1' incorrectly warned about the format
@@ -71,9 +71,9 @@ cat <<EOF > exp
 0
 1
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 touch experr
-compare err experr || fail=1
+compare experr err || fail=1
 compare 'xx   000' experr || fail=1
 compare 'xx 0x001' in || fail=1
 rm -f in out exp err experr xx*
@@ -89,7 +89,7 @@ csplit: line number `1' is smaller than preceding line number, 2
 csplit: warning: line number `3' is the same as preceding line number
 csplit: `3': line number out of range
 EOF
-compare err experr || fail=1
+compare experr err || fail=1
 
 # Ensure that lines longer than the initial buffer length don't cause
 # trouble (e.g. reading from freed memory, resulting in corrupt output).
index c55c8c1d47fcb248ec01d4b559c1df125cc1dc67..042abb5ec530f15990739cb0ab73a8f1599d0ae6 100755 (executable)
@@ -32,6 +32,6 @@ BLOCK_SIZE=1M df -P . > t2 || fail=1
 head -n1 t1 > exp || fail=1
 head -n1 t2 > out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 4d424c0951186364c51b544cf787641957bccb08..cf1356bf84372f74b92ccf3527d501ccce6b26bb 100755 (executable)
@@ -56,6 +56,6 @@ EOF
 
 fmt -s in > out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 711d452e79ff06d568bbce083e6808fb71c21f50..b6cf873bdae658ae2c1b34bfefa8bf5be1246116 100755 (executable)
@@ -27,6 +27,6 @@ echo $? >> out
 groups -- none -- > exp 2>&1 && fail=1
 echo $? >> exp
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index f086a74e7847aec5684b753bf8666395d22154c5..e1ca78ccd9d38f9f21099559f40507527dc68d16 100755 (executable)
@@ -23,6 +23,6 @@ require_built_ groups
 groups --version | sed 's/^groups/id/; /^$/q' > out || fail=1
 id --version | sed '/^$/q' > exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 79e2a43e09a0173f7be3eb3dabb77e3916c20130..a8bfe2f86afcc9e715e2dad76eda0b5a564ef4dd 100755 (executable)
@@ -27,6 +27,6 @@ cat <<EOF > exp
 b
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 05270c8d7631617954d52cca44df7f853f0a38c1..4eef6f867fd707ffa08202cfeeb5f588ca523e0a 100755 (executable)
@@ -38,6 +38,6 @@ cat <<\EOF > exp
        $
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 2aa210674e056b21928d5893fe9af4f29f18d084..17c11aec59b1edac7c9610d9b5c54ccef4f5d225 100755 (executable)
@@ -27,6 +27,6 @@ cat <<EOF > exp || fail=1
    a   b   c
    d   e   f
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 4f86987689ac530fb8a141bf613594115acce6ee..edcb5d9ae26b481fbc03683731512da082ec34cf 100755 (executable)
@@ -37,6 +37,6 @@ for format1 in $list; do
   done
 done
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index b66269faf9e8bc6d96cd7a159ed99ca4558d3c33..2cbe5c34e3f67a1b9e83e1cd297246ee3392a3d2 100755 (executable)
@@ -38,6 +38,6 @@ od -An -t x1 in \
   | sort -n \
   > exp
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index b9092e17f147111b06327c59bafa04e3fe7f8cb7..276541968b15241bee5b99a97a342ba71936e360 100755 (executable)
@@ -34,7 +34,7 @@ cat <<\EOF > exp
 foo
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 rm -f out exp
 # Until coreutils-4.5.10, this would elicit a segfault.
@@ -94,7 +94,7 @@ cat <<\EOF > exp
 11  x
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Verify handling of single quote chars (\' or \")
 
@@ -121,7 +121,7 @@ printf: ": expected a numeric value
 printf: a: expected a numeric value
 EOF
 
-compare out exp || fail=1
-compare err exp_err || fail=1
+compare exp out || fail=1
+compare exp_err err || fail=1
 
 Exit $fail
index 106490ece22d903cbeb03dba1e4d61228ed1b6bb..000f7b17f8a368a13bdfd0b4f4ac8d464009c491 100755 (executable)
@@ -24,6 +24,6 @@ cat <<\EOF > exp
 ~3
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 708401ff277317a3fbd863c7f770aca39941d80e..e51a0ae6e0c946970f93be89b96fed67b96475da 100755 (executable)
@@ -57,6 +57,6 @@ printf %s\\n "$base/a/b" >> exp || fail=1
 env -- PWD="$base/a/../c" pwd -L >> out || fail=1
 printf %s\\n "$base/a/b" >> exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 1c50d6a4ffd720e07926b1e2a19834838b7e2cc1..58bfde100d1eda56a0b6d9adc42ba292af6ebf5c 100755 (executable)
@@ -35,7 +35,7 @@ ln -s ../s/2 d/1 || framework_failure_
 readlink -v -e p/1 > out || fail=1
 # readlink -e d/2 > exp || fail=1
 echo "$cwd/d/2" > exp || fail=1
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Construct a real loop and make sure readlink still detects it.
 ln -sf ../s/1 d/2 || framework_failure_
@@ -57,12 +57,12 @@ ln -nsf ../p/8 d/7 || framework_failure_
 echo x > d/8       || framework_failure_
 readlink -v -e p/1 > out || fail=1
 echo "$cwd/d/8" > exp || fail=1
-compare out exp || fail=1
+compare exp out || fail=1
 
 # A trivial loop
 ln -s loop loop
 readlink -v -e loop 2> out && fail=1
 echo "readlink: loop: $symlink_loop_msg" > exp || framework_failure_
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 7a4825680cc35785c166325b996bfdf35373e77b..af99e1b50617cb366004ab2ce7a7bfbeca135eee 100755 (executable)
@@ -37,6 +37,6 @@ case `cat out` in
   'runcon: invalid context: '*) echo "$diag" > out;;
 esac
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 230912cbe8decbc53712e5e8e51fb6cd0a9d05f4..cdf06ace63717d5fb44162add7049a039447f8f3 100755 (executable)
@@ -42,6 +42,6 @@ b=$INTMAX_OFLOW
 
 seq $a $b > out || fail=1
 printf "$a\n$b\n" > exp || fail=1
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index ead871e436ec04c8fb00f9f8a40798208d78d834..8075cbb7ba0a1439c2b406729102788090bd2dd4 100755 (executable)
@@ -23,6 +23,6 @@ echo nan > F || fail=1
 printf 'nan\nnan\n' > exp || fail=1
 timeout 10 sort -g -m F F > out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 6a61a14623fa5fc5ae0bdf31df93a8dcfd5484c9..1baf58788b1063faaa87c1da8f2f0a484990bdfd 100755 (executable)
@@ -48,6 +48,6 @@ close (FILE);
 
 time sort in > out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index b4c2fb74ee0b324ccb42825346b3168f5dd19c96..db3a91364318c6c72d7515b873c2c7f9f5f8d25e 100755 (executable)
@@ -284,7 +284,7 @@ printf '\0\ta\n' | sort -s -k2b,2 --debug | tr -d '\0'
 printf 'A\tchr10\nB\tchr1\n' | sort -s -k2.4b,2.3n --debug
 ) > out
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 cat <<\EOF > exp
    1²---++3   1,234  Mi
@@ -324,7 +324,7 @@ if test "$LOCALE_FR_UTF8" != "none"; then
       sort --debug -k1,1n -k1,1g \
         -k1,1h -k2,2n -k2,2g -k2,2h -k3,3n -k3,3g -k3,3h
   ) > out
-  compare out exp || fail=1
+  compare exp out || fail=1
 fi
 
 Exit $fail
index 850f57c15e03fa78fac91b07606b3dfcf5712eee..aacd9b3be5113cd9d3ade8a03c947113d0bab7ab 100755 (executable)
@@ -88,7 +88,7 @@ $LDBL_MAX
 
   tac exp | LC_ALL=$LOC sort -sg > out || fail=1
 
-  compare out exp || fail=1
+  compare exp out || fail=1
 done
 
 Exit $fail
index 2de14f4f7d204e1a711687eab78e6865d813b28b..add4bc3a46f5c61e10e8550228cd6bc6a10fa7da 100755 (executable)
@@ -68,6 +68,6 @@ echo 6 >out || fail=1
  ulimit -n 10 &&
  sort -n -m --batch-size=7 -o out out in/1 in/2 in/3 in/4 in/5 out
 ) &&
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 6a40c379c7970f393157782b34726d23b8fc94c0..e8e9ecf74516782ef9803ca8bd8aee05e703b72d 100755 (executable)
@@ -43,6 +43,6 @@ EOF
 sort --parallel=1 -u in > exp || fail=1
 
 sort --parallel=2 -u -S 10b < in > out || fail=1
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 9a950ba6495105c9463330832914d1b4b907c6e3..c2addcd20cb5eac0847d16d41341e03b431e20a7 100755 (executable)
@@ -25,6 +25,6 @@ touch f || framework_failure_
 stat --format=%n - < f > out || fail=1
 stat -f - < f && fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index c317855d675d08182d88ee3af28b82a75f712ad6..92dcd47ea5b6b9dd7251f6ca3ba0971dae2cb0e1 100755 (executable)
@@ -39,6 +39,6 @@ stat --format=%F link2 >> out || fail=1
 stat -L --format=%F link2 >> out || fail=1
 stat --format=%F link2/ >> out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index ccf60b197b0201bd07555f0dff9e49a4c9abaa62..7a102d3838ab787c95d620bcebb6bf35975d3352 100755 (executable)
@@ -65,7 +65,7 @@ stdbuf_linebuffer()
   dd count=1 if=fifo > out 2> err &
   (printf '1\n'; sleep $delay; printf '2\n') | stdbuf -oL uniq > fifo
   wait # for dd to complete
-  compare out exp
+  compare exp out
 }
 
 retry_delay_ stdbuf_linebuffer .1 6 || fail=1
@@ -79,7 +79,7 @@ stdbuf_unbuffer()
   dd count=1 if=fifo > out 2> err &
   (printf '1\n'; sleep $delay; printf '2\n') | stdbuf -o0 uniq > fifo
   wait # for dd to complete
-  compare out exp
+  compare exp out
 }
 
 retry_delay_ stdbuf_unbuffer .1 6 || fail=1
@@ -92,7 +92,7 @@ retry_delay_ stdbuf_unbuffer .1 6 || fail=1
     # dd count=1 if=fifo > /dev/null 2> err &
     # printf '1\n\2\n3\n' | (stdbuf -i0 -oL uniq > fifo; cat) > out
     # wait # for dd to complete
-    # compare out exp || fail=1
+    # compare exp out || fail=1
 #  One could remove the need for dd (used to close the fifo to get uniq to quit
 #  early), if head -n1 read stdin char by char. Note uniq | head -c2 doesn't
 #  suffice due to the buffering implicit in the pipe.  sed currently does read
@@ -100,7 +100,7 @@ retry_delay_ stdbuf_unbuffer .1 6 || fail=1
 #  adding this dependency on a program outside of coreutils.
     # printf '2\n' > exp
     # printf '1\n2\n' | (stdbuf -i0 sed 1q >/dev/null; cat) > out
-    # compare out exp || fail=1
+    # compare exp out || fail=1
 
 # Ensure block buffering stdout takes effect
 # We don't currently test block buffering failures as
@@ -113,7 +113,7 @@ retry_delay_ stdbuf_unbuffer .1 6 || fail=1
    #   dd count=1 if=fifo > out 2> err &
    #   (printf '1\n'; sleep $delay; printf '2\n') | stdbuf -o4 uniq > fifo
    #   wait # for dd to complete
-   #   compare out exp
+   #   compare exp out
    # }
    #
    # retry_delay_ stdbuf_blockbuffer .1 6 || fail=1
index f4d6a18ed37ff08e26d294d1e8bf4e102442029f..19b79ef0ff036da64aaa3ab5a4e2e3aa70dcd7e0 100755 (executable)
@@ -35,7 +35,7 @@ $PERL -e '$s = chr(255) x 65537; foreach (1..257) {print $s}' \
 cat > exp <<\EOF
 65535 32897
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 rm -f out exp
 
@@ -45,6 +45,6 @@ $PERL -e '$s = chr(255) x 65537; foreach (1..257) {print $s}; print chr(255)' \
 cat > exp <<\EOF
 254 32897
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 7b48773674f73cf2829ee622df62402913b1a4e6..8ff30dce9b2c55ad6b85b9e670bb9a6d8b35dd7b 100755 (executable)
@@ -21,7 +21,7 @@ print_ver_ tac
 
 echo x | tac - - > out 2> err || fail=1
 echo x > exp || fail=1
-compare out exp || fail=1
-compare err /dev/null || fail=1
+compare exp out || fail=1
+compare /dev/null err || fail=1
 
 Exit $fail
index 0040ac60a15051473f72af6d72c62c808303d021..be6325ce46ca021867c4b6d3fed16fee877c8faf 100755 (executable)
@@ -65,6 +65,6 @@ cat <<\EOF > exp || fail=1
 1
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 92f1a576c704273629afb95d49337880212cd66b..680f25a11b55ba5e262c1aee4c9f84c84a440096 100755 (executable)
@@ -23,10 +23,10 @@ print_ver_ tr
 echo '01234567899999999999999999' > exp
 echo 'abcdefghijklmnopqrstuvwxyz' |
 tr '[:lower:]' '0-9' > out || fail=1
-compare out exp || fail=1
+compare exp out || fail=1
 echo 'abcdefghijklmnopqrstuvwxyz' |
 tr '[:lower:][:lower:]' '[:upper:]0-9' > out || fail=1
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Validate the alignment of case classes
 tr 'A-Z[:lower:]' 'a-y[:upper:]' < /dev/null && fail=1
@@ -44,21 +44,21 @@ tr '[:upper:][:lower:]' '[:upper:]a-z' < /dev/null || fail=1
 tr '[:upper:] ' '[:lower:]' < /dev/null 2>out && fail=1
 echo 'tr: when translating with string1 longer than string2,
 the latter string must not end with a character class' > exp
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Up to coreutils-6.9, tr rejected an unmatched [:lower:] or [:upper:] in SET1.
 echo '#$%123abcABC' | tr '[:lower:]' '[.*]' > out || fail=1
 echo '#$%123...ABC' > exp
-compare out exp || fail=1
+compare exp out || fail=1
 echo '#$%123abcABC' | tr '[:upper:]' '[.*]' > out || fail=1
 echo '#$%123abc...' > exp
-compare out exp || fail=1
+compare exp out || fail=1
 
 # When doing a case-converting translation with something after the
 # [:upper:] and [:lower:] elements, ensure that tr honors the following byte.
 echo 'abc.' | tr '[:lower:].' '[:upper:]x' > out || fail=1
 echo 'ABCx' > exp
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Before coreutils 8.6 the disparate number of upper and lower
 # characters in some locales, triggered abort()s and invalid behavior
@@ -73,41 +73,41 @@ if test "$(locale charmap 2>/dev/null)" = ISO-8859-1; then
   tr '[:upper:] ' '[:lower:]' < /dev/null 2>out && fail=1
   echo 'tr: when translating with string1 longer than string2,
 the latter string must not end with a character class' > exp
-  compare out exp || fail=1
+  compare exp out || fail=1
 
   # Ensure when there are a different number of elements
   # in each string, we validate the case mapping correctly
   echo 'abc.xyz' |
   tr 'ab[:lower:]' '0-1[:upper:]' > out || fail=1
   echo 'ABC.XYZ' > exp
-  compare out exp || fail=1
+  compare exp out || fail=1
 
   # Ensure we extend string2 appropriately
   echo 'ABC- XYZ' |
   tr '[:upper:]- ' '[:lower:]_' > out || fail=1
   echo 'abc__xyz' > exp
-  compare out exp || fail=1
+  compare exp out || fail=1
 
   # Ensure the size of the case classes are accounted
   # for as a unit.
   echo 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
   tr '[:upper:]A-B' '[:lower:]0' >out || fail=1
   echo '00cdefghijklmnopqrstuvwxyz' > exp
-  compare out exp || fail=1
+  compare exp out || fail=1
 
   # Ensure the size of the case classes are accounted
   # for as a unit.
   echo 'a' |
   tr -t '[:lower:]a' '[:upper:]0' >out || fail=1
   echo '0' > exp
-  compare out exp || fail=1
+  compare exp out || fail=1
 
   # Ensure the size of the case classes are accounted
   # for as a unit.
   echo 'a' |
   tr -t '[:lower:][:lower:]a' '[:lower:][:upper:]0' >out || fail=1
   echo '0' > exp
-  compare out exp || fail=1
+  compare exp out || fail=1
 fi
 
 Exit $fail
index cea79d464cfa0f00cb66bfb7c11911c35501ef17..50cb5f411adf7cee800c29313ad8b554bd5e3368 100755 (executable)
@@ -32,7 +32,7 @@ truncate -s0 $dir > out 2>&1 && fail=1
 cat <<EOF > exp
 truncate: cannot open \`$dir' for writing: No such file or directory
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 dir=$d1/
 truncate -s0 $dir > out 2>&1 && fail=1
index 49df3b4b0e45ef92d1976465aa81f25faaa0f63f..0cc4b84174482dc38f38f639dd097c3a661960ab 100755 (executable)
@@ -31,13 +31,13 @@ cat <<\EOF > exp || fail=1
  2  3 10 total
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 if test "$fail" = ''; then
   # Repeat the above test, but read the file name list from stdin.
   rm -f out
   wc --files0-from=- < names > out || fail=1
-  compare out exp || fail=1
+  compare exp out || fail=1
 fi
 
 Exit $fail
index 20a463f3c178c418d618f7389440faa1107348ee..aa0e8820b1be5c1be5806324a681aa56ccd2e9f1 100755 (executable)
@@ -50,7 +50,7 @@ for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do
     -e 's/ Unknown error .*$//'        \
     -e 's/ No such file or directory$//' out > k || fail=1
   mv k out || fail=1
-  compare out exp || fail=1
+  compare exp out || fail=1
 done
 
 Exit $fail
index 3026365dddab80f2129e76552130edce485f6cb6..b54210bacdcc406cc0f67a2349ccdc653bd1b420 100755 (executable)
@@ -29,6 +29,6 @@ cat <<\EOF > exp || fail=1
 `A' -> `B' (backup: `B.~1~')
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index ba05870abbdaac6d763d092570893cab46657530..0d4a06d4c1bf8cfcf4ca9300ab5aa3daf06bf763 100755 (executable)
@@ -41,6 +41,6 @@ cat > exp <<\EOF
 XXX: backing up `YYY' would destroy source;  `ZZZ' not moved
 EOF
 
-compare out2 exp || fail=1
+compare exp out2 || fail=1
 
 Exit $fail
index 2007ee063e884733fda2eae78bee0c6a2b1f57de..21bb5e61f844495db85acb2d34d54933e00c5726 100755 (executable)
@@ -43,6 +43,6 @@ mv: target `f1' is not a directory
 mv: target `f2' is not a directory
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 452bb7de916fdb8472d625a0ddd7e593aea06269..cf4ba0a90ad41a0068aa2d476d4588abfb0085bc 100755 (executable)
@@ -37,6 +37,6 @@ cat <<\EOF > exp || fail=1
 mv: cannot move `b/t' to `a/t': Directory not empty
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 0bbe36aedbc5d1bea64f6c5e1767bd3b14fff583..5b91ba51e234a92adc1e503f71eede6ddcbce556 100755 (executable)
@@ -45,7 +45,7 @@ $i: warning: source file \`a' specified more than once
 $i: warning: source file \`a' specified more than once
 $i: will not overwrite just-created \`d/a' with \`a'
 EOF
-  compare out exp || fail=1
+  compare exp out || fail=1
 done
 
 for i in mv; do
@@ -59,7 +59,7 @@ for i in mv; do
 $i: cannot stat \`a': No such file or directory
 $i: cannot stat \`a': No such file or directory
 EOF
-  compare out exp || fail=1
+  compare exp out || fail=1
 done
 
 Exit $fail
index 4aa754003b40be7888be88017e87eb4fc5564fbe..5ef6391d32c80adceaf41f061b3a11509398bdcd 100755 (executable)
@@ -32,7 +32,7 @@ cat > exp <<EOF
 mv: \`$ff' and \`$ff' are the same file
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 test `cat $ff` = force-contents || fail=1
 
 # This should succeed, even though the source and destination
index 95d959d573571ff149e2e123f479b3da4125be4b..b354447ee23d6a96988340425e74fed7d4fbf8aa 100755 (executable)
@@ -28,6 +28,6 @@ cat <<\EOF > exp || fail=1
 removed `x'
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 7858eb91b6ae68d3debe23067ac9cecb4a580353..94fc43db965c17ed99010049f041e0c710aa7b86 100755 (executable)
@@ -32,8 +32,8 @@ mv a/bar a/foo b < no > out 2> err || fail=1
 touch exp
 touch exp_err
 
-compare out exp || fail=1
-compare err exp_err || fail=1
+compare exp out || fail=1
+compare exp_err err || fail=1
 
 case "`cat b/foo`" in
   foo) ;;
index a4df10a6bb101d540db394bdb0896466e0c19e87..16aa681d617f2f4a1073ece6e23b70a2e309669f 100755 (executable)
@@ -40,7 +40,7 @@ cat > exp <<\EOF
 XXX: cannot move `SRC' to a subdirectory of itself, `DEST'
 EOF
 
-compare out2 exp || fail=1
+compare exp out2 || fail=1
 
 # Make sure the file is gone.
 test -f $file && fail=1
index 28e21276833bae957355cbf5ed32d8ebb53afde1..9cc6ef016a5b37f5351b950992c6d6c2ca3ce6a9 100755 (executable)
@@ -47,6 +47,6 @@ XXX: `ZZZ' and `YYY' are the same file
 EOF
 #'
 
-compare out2 exp || fail=1
+compare exp out2 || fail=1
 
 Exit $fail
index 8d1eadb5fca636a43a7338c6850faba19041317a..c937ebad10caad160fa5a123b9a0db7ea4790428 100755 (executable)
@@ -36,6 +36,6 @@ cat > exp <<\EOF
 XXX: cannot move `ZZZ' to a subdirectory of itself, `ZZZ/ZZZ'
 EOF
 
-compare out2 exp || fail=1
+compare exp out2 || fail=1
 
 Exit $fail
index f43a7079133e2480d107a58f11c5d8fe9673d169..34a2269991cb2712c471b3a623ea86566a201c70 100755 (executable)
@@ -64,7 +64,7 @@ cat <<EOF | sort > exp
 \`$dir/d/e/f/file2' -> \`XXX/$dir/d/e/f/file2'
 EOF
 
-compare out2 exp || fail=1
+compare exp out2 || fail=1
 
 # cd "$other_partition_tmpdir"
 # ls -l -A -R "$other_partition_tmpdir"
index c653df8233d233e0446bbcebc5311d575166b177..acf291e9ed20d1374e839f25056f99b6e98f8944 100755 (executable)
@@ -50,6 +50,6 @@ else
     fail=1
   fi
 fi
-test $fail = 1 && compare out exp
+test $fail = 1 && compare exp out
 
 Exit $fail
index cab0076f25707429e639e0364760426ccab69fc7..6b37e04f80b13182c12aab041c33d2669f0bb460 100755 (executable)
@@ -30,6 +30,6 @@ cat <<\EOF > exp
 mv: cannot move `no-write/dir' to `./dir': Permission denied
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 3d61c3c27cf5f0b56b6582bc37a1d889729a7b0e..a8b2e59524ad44b9a889c7517c74cef0731aa1d0 100755 (executable)
@@ -62,6 +62,6 @@ cat <<\EOF > exp
 mv: cannot remove `t/root-owned': Operation not permitted
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 104cf594c55978b5bc72c01ba73b8b9053fa2e3e..b00ce5ce920e9b33cb2f34d15d6dbdb0d7d73fa0 100755 (executable)
@@ -60,6 +60,6 @@ cp b no-such/ 2> err && fail=1
 # Map "No such file..." diagnostic to the expected "Not a directory"
 sed 's/No such file or directory/Not a directory/' err > k && mv k err
 
-compare err expected-err || fail=1
+compare expected-err err || fail=1
 
 Exit $fail
index 30596fb6986b0dea39b37796fa04c9e75ed85717..4146a988f6d998034dc247e0cb0f738ad8635fe4 100755 (executable)
@@ -31,6 +31,6 @@ rm: cannot remove `a/b/file'
 rm: cannot remove `a/b/file'
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index b4721ad4e895c39587daa0ae011f63ec815d5c04..5f3f8405834671312e785ea5bb591c2f5844cc60 100755 (executable)
@@ -37,6 +37,6 @@ EOF
 sed 's/remove directory/remove/' out-t > out
 rm -f out-t
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 2e2f15237a12a37e478cc6093034be7764ec2afd..6fdb884f8b3158dfdee8860c5dbc72e9d5776ef8 100755 (executable)
@@ -29,6 +29,6 @@ rm: cannot remove `d': Is a directory
 EOF
 
 # Before coreutils-5.93 this test would fail on Solaris 9 and newer.
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index cd294c5bcbc57a5a72d92755709dd4356ca12889..b9cdb57fd6b6f333a664120065dc333c2d0a7a31 100755 (executable)
@@ -50,6 +50,6 @@ cat <<\EOF > exp
 rm: cannot remove `a/b': Operation not permitted
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 8e9b5b07e6023f1f26e1c25d6db4735cc7ae9f4d..89e6357ba86bc5c448965153f715f31d6c610540 100755 (executable)
@@ -42,13 +42,13 @@ rm -rf d/f 2> out && fail=1
 cat <<\EOF > exp
 rm: cannot remove `d/f': Permission denied
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 # This used to fail with ELOOP.
 rm -rf e 2> out && fail=1
 cat <<\EOF > exp
 rm: cannot remove `e/slink': Permission denied
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 5ffde73c7162984864e1fd22c22ae26470f0e4fb..7179bdbd17bd58d231a650ee813bafa5adf02248 100755 (executable)
@@ -28,6 +28,6 @@ touch exp || framework_failure_
 
 rm --interactive=never f > out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index e87ab793df6251b6564be9c2a6fa44a8c838a8fe..b0e087c2ef0b03ad763efb778ba7ed30ac12fa1f 100755 (executable)
@@ -44,6 +44,6 @@ EOF
 # to the expected one:
 sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 032c645ed0e64b946342c3bba10266893a84f4fc..70bf03a11a773eca1f6fa5e9eabaeb68ed6ec0b5 100755 (executable)
@@ -83,7 +83,7 @@ WHEN=always
 rm: remove all arguments recursively? .
 EOF
 
-compare out expout || fail=1
-compare err experr || fail=1
+compare expout out || fail=1
+compare experr err || fail=1
 
 Exit $fail
index fc1c76dd7118818deaf0e74702fafcaa801525f2..f2f946bdc91134056072d52393682b41460d1bad 100755 (executable)
@@ -103,7 +103,7 @@ multiple files, recursion, answer yes
 rm: remove all arguments recursively? .
 EOF
 
-compare out expout || fail=1
-compare err experr || fail=1
+compare expout out || fail=1
+compare experr err || fail=1
 
 Exit $fail
index 1118b9465766ae9eaec1f091a3961149b43e9670..15e395f1102e30c70754111ce35c908f531310f2 100755 (executable)
@@ -49,6 +49,6 @@ EOF
 # Append an `x' and a newline.
 echo x >> out
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 064d27c2b0e3f64b3ba8b9c8da542fda9652e566..93c1f7ff64bafb928366dd3e70b430d7e2177709 100755 (executable)
@@ -43,6 +43,6 @@ EOF
 rm --one-file-system -rf a 2> out && fail=1
 test -d $t/y || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index f4f43d042f449d69ececcda977dc1dff463c7224..3de093b4a08eb2b0b1fb33bb6fd7cbc95eb6b30b 100755 (executable)
@@ -39,7 +39,7 @@ EOF
 cmp out exp > /dev/null 2>&1 || {
   cmp out exp2 || fail=1
   }
-test $fail = 1 && compare out exp
+test $fail = 1 && compare exp out
 
 test -d b/a/p || fail=1
 test -d b/c && fail=1
index 6df1e2090abf802301ac0a5bbceeadb0076fc40e..e3fd0c91116e356964915eaf4fa497de76953868 100755 (executable)
@@ -42,7 +42,7 @@ EOF
 
 cmp out exp > /dev/null 2>&1 \
     || { cmp out exp-solaris > /dev/null 2>&1 || fail=1; }
-test $fail = 1 && compare out exp
+test $fail = 1 && compare exp out
 
 test -d a/0 && fail=1
 test -d a/1 || fail=1
index 56aea8c1edac3ec9f6983bfa965089eed14ec20e..b2f3b0e91b0468946259acd45af7e6fb365cbb1f 100755 (executable)
@@ -66,7 +66,7 @@ rm: remove write-protected directory \`z/du'
 rm: remove directory \`z'
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 test -d z && fail=1
 
index 5c33bf7296daa5bdad500230274b97ea34daf420..2dfaf73ec6662691acb6afda293f1552a1021263 100755 (executable)
@@ -47,6 +47,6 @@ mv o2 out
 # Make sure it's been removed.
 test -d d && fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index ae3365f25d5117ae297d68930f035c2209979005..a26ad03931d090af381b5ab08220e8f32c382e0f 100755 (executable)
@@ -30,6 +30,6 @@ cat <<\EOF > exp
 rm: cannot remove `a': Permission denied
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 6620742ec1037d357502936b258d5715c54861d9..d257b4d3e1b956b9125ac0400bf418c0ed055a48 100755 (executable)
@@ -29,6 +29,6 @@ removed `a/x'
 removed directory: `a'
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 1a4c24160c519d18060653f4d7aff616ad9ea608..35dea0eec5a1ef6ca11228495ea6b3ebb34db6a6 100644 (file)
@@ -31,6 +31,6 @@ cat <<\EOF > exp || fail=1
 FIXME
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 3191620aa030607c283c5d8e5a32b98bf2012a9a..5e7f82d5db939316c20e10b71798559cb66462c8 100755 (executable)
@@ -39,12 +39,12 @@ printf '1\n2' > exp-1
 printf '\n3\n' > exp-2
 printf '4\n5\n' > exp-3
 
-compare xaa exp-1 || fail=1
-compare xab exp-2 || fail=1
-compare xac exp-3 || fail=1
-compare b1 exp-1 || fail=1
-compare b2 exp-2 || fail=1
-compare b3 exp-3 || fail=1
+compare exp-1 xaa || fail=1
+compare exp-2 xab || fail=1
+compare exp-3 xac || fail=1
+compare exp-1 b1 || fail=1
+compare exp-2 b2 || fail=1
+compare exp-3 b3 || fail=1
 test -f xad && fail=1
 
 Exit $fail
index 039f457a3f0151221570810953de40c0ca2c898f..79f62f81ea99f2174b533cec8b38042e868bf01e 100755 (executable)
@@ -69,7 +69,7 @@ mv -f out-t out
 cat <<\EOF > exp
 split: line count option -99*... is too large
 EOF
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Make sure split fails when it can't read input
 # (the current directory in this case)
index e1c9ec7d891b7542ce5b2b507832c43b511c0ac3..8dbbece5143393448d14dc1798fa528247c0334d 100755 (executable)
@@ -22,11 +22,11 @@ print_ver_ split
 # invalid number of chunks
 echo 'split: 1o: invalid number of chunks' > exp
 split -n l/1o 2>err && fail=1
-compare err exp || fail=1
+compare exp err || fail=1
 
 echo "split: \`-': cannot determine file size" > exp
 echo | split -n l/1 2>err && fail=1
-compare err exp || fail=1
+compare exp err || fail=1
 
 # N can be greater than the file size
 # in which case no data is extracted, or empty files are written
@@ -52,7 +52,7 @@ printf "%s" "$lines" | tr '~' '\n' > in || framework_failure_
 
 echo 'split: 16: invalid chunk number' > exp
 split -n l/16/15 in 2>err && fail=1
-compare err exp || fail=1
+compare exp err || fail=1
 
 printf '%s' "\
 14 16 09 15 16 10
@@ -119,20 +119,20 @@ test "$DEBUGGING" && test "$VERBOSE" && set -x
 : > out
 printf '1\n12345\n' > exp
 split -n l/13/15 in > out
-compare out exp || fail=1
+compare exp out || fail=1
 : > out
 printf '' > exp
 split -n l/14/15 in > out
-compare out exp || fail=1
+compare exp out || fail=1
 : > out
 printf '1\n12345\n1\n' > exp
 split -n l/15/15 in > out
-compare out exp || fail=1
+compare exp out || fail=1
 
 # test input with no \n at end
 printf '12\n34\n5' > in
 printf '5' > exp
 split -n l/7/7 in > out
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 1612c2e230decbddbb85410fc0a138faf9cf413d..3269449d05a94ecdb7bb24a9248929744e3f7a6c 100755 (executable)
@@ -34,9 +34,9 @@ cat <<\EOF > exp-3
 5
 EOF
 
-compare xaa exp-1 || fail=1
-compare xab exp-2 || fail=1
-compare xac exp-3 || fail=1
+compare exp-1 xaa || fail=1
+compare exp-2 xab || fail=1
+compare exp-3 xac || fail=1
 test -f xad && fail=1
 
 Exit $fail
index ea2ac9f20dd154e91778922d09e31048669501f4..821b297fd6aa74c21e4d216790e87d25da0f03d8 100755 (executable)
@@ -44,18 +44,18 @@ printf '1\n4\n' > exp-1
 printf '2\n5\n' > exp-2
 printf '3\n' > exp-3
 
-compare xaa exp-1 || fail=1
-compare xab exp-2 || fail=1
-compare xac exp-3 || fail=1
-compare r1 exp-1 || fail=1
-compare r2 exp-2 || fail=1
-compare r3 exp-3 || fail=1
+compare exp-1 xaa || fail=1
+compare exp-2 xab || fail=1
+compare exp-3 xac || fail=1
+compare exp-1 r1 || fail=1
+compare exp-2 r2 || fail=1
+compare exp-3 r3 || fail=1
 test -f xad && fail=1
 
 # Test input without trailing \n
 printf '1\n2\n3\n4\n5' | split -n r/2/3 > out
 printf '2\n5' > exp
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Ensure we fall back to appending to a file at a time
 # if we hit the limit for the number of open files.
index efb0d8166351cf7919a80c075a44453944b14501..da5b7fde35769b669bfa9ffa592949da6309aaa0 100755 (executable)
@@ -45,11 +45,11 @@ test -f xz || fail=1
 test -f xaa && fail=1
 test -f xaz && fail=1
 rm -f x*
-compare err exp-too-short || fail=1
+compare exp-too-short err || fail=1
 
 # With a longer suffix, it must succeed.
 split --verbose -b 1 -a 2 in > err || fail=1
-compare err exp || fail=1
+compare exp err || fail=1
 
 # Ensure that xbb is *not* created.
 test -f xbb && fail=1
index 874081168a16e414af2fa3dece5f34ebf7ba0bf6..ecd73c09b60e27c363db3f58389b0e96df0864d6 100755 (executable)
@@ -45,6 +45,6 @@ cat <<\EOF > exp
 1
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index e34b77964f309553b2db5590a4ed8fec1f718656..15aff279c276bab038c63b2b1c8ec86281de74b0 100755 (executable)
@@ -31,6 +31,6 @@ test $? = 1 || fail=1
 # we can compare against the above error
 sed '/inotify cannot be used/d' err > k && mv k err
 
-compare err exp || fail=1
+compare exp err || fail=1
 
 Exit $fail
index 51520ab67f2b2a1702624ac941a1fa260267de0b..66fb26c3d426278605634e6f998b911551836065 100755 (executable)
@@ -31,6 +31,6 @@ test $? = 124 || fail=1
 test -s err && fail=1
 
 # Ensure there was
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index db092e75853265d77f040fa6cf77cc9dad6ab1c9..3552f10897f2614081ee570f25b68debe142ebcb 100755 (executable)
@@ -22,6 +22,6 @@ print_ver_ tail
 echo foo | timeout 10 tail -f -c3 > out || fail=1
 echo oo > exp || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 3421798b4392bb0f2ce6e7c983ef9d12a4e2c222..727b30676d9bbe7006c1440c50f59fe853948633 100755 (executable)
@@ -35,7 +35,7 @@ check_tail_output()
 # Wait 6.3s for tail to write something.
 retry_delay_ check_tail_output .1 7 || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 # Kill the still-running tail, or fail if it's gone.
 kill $pid || fail=1
index 3dcbacbf9c3207b3567f42cb16aa381f5986eb5e..6658ca2019829183d4cbae56bcdcfd6546a96c74 100755 (executable)
@@ -28,6 +28,6 @@ cat <<EOF > exp
 2
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 578aedc5359f50c277347e2c86f6c9ee871ac1a8..62b7ebff1a8c1954dce5193184a4b444e4aa2630 100755 (executable)
@@ -28,6 +28,6 @@ TZ=UTC0 touch -t 197001010000.60 f || fail=1
 
 stat --p='%.9Y\n' f > out || fail=1
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index a2613fe2306f7cc3e80861ad9f23f8b98cd5ce12..fbd0cd112b2f437069244c14c486cf08a17234af 100755 (executable)
@@ -27,6 +27,6 @@ cat <<EOF > exp
 touch: cannot touch \`$file': No such file or directory
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail
index 98dd4e34845c8c3bf8aa91a35e543632f836a061..c8b567c631357d75a7ebfa623bb9a2c5f68bee41 100755 (executable)
@@ -50,6 +50,6 @@ EOF
 done
 test "$match" = 1 || fail=1
 
-test $fail = 1 && compare out exp
+test $fail = 1 && compare exp out
 
 Exit $fail
index a530eaa67aa77fadde18aed23935c28aec3bbf44..7e82496199de15108f7b4b429d61c265ede6ae84 100755 (executable)
@@ -33,6 +33,6 @@ cat <<\EOF > exp || fail=1
 2004-01-11
 EOF
 
-compare out exp || fail=1
+compare exp out || fail=1
 
 Exit $fail