summaryrefslogtreecommitdiff
path: root/tests/cp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cp')
-rwxr-xr-xtests/cp/abuse2
-rwxr-xr-xtests/cp/backup-is-src2
-rwxr-xr-xtests/cp/cp-a-selinux4
-rwxr-xr-xtests/cp/cp-mv-enotsup-xattr2
-rwxr-xr-xtests/cp/fail-perm4
-rwxr-xr-xtests/cp/into-self2
-rwxr-xr-xtests/cp/proc-zero-len2
-rwxr-xr-xtests/cp/src-base-dot2
-rwxr-xr-xtests/cp/thru-dangling4
9 files changed, 12 insertions, 12 deletions
diff --git a/tests/cp/abuse b/tests/cp/abuse
index 43b7df0d9..1573ed5b0 100755
--- a/tests/cp/abuse
+++ b/tests/cp/abuse
@@ -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.
diff --git a/tests/cp/backup-is-src b/tests/cp/backup-is-src
index bb6478940..9547c4e7e 100755
--- a/tests/cp/backup-is-src
+++ b/tests/cp/backup-is-src
@@ -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
diff --git a/tests/cp/cp-a-selinux b/tests/cp/cp-a-selinux
index 0f9c14938..7ef24d801 100755
--- a/tests/cp/cp-a-selinux
+++ b/tests/cp/cp-a-selinux
@@ -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
diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr
index 32798d2fc..f30358136 100755
--- a/tests/cp/cp-mv-enotsup-xattr
+++ b/tests/cp/cp-mv-enotsup-xattr
@@ -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
diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm
index 404c83e39..d05189785 100755
--- a/tests/cp/fail-perm
+++ b/tests/cp/fail-perm
@@ -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
diff --git a/tests/cp/into-self b/tests/cp/into-self
index deb5a5325..91c3a5a85 100755
--- a/tests/cp/into-self
+++ b/tests/cp/into-self
@@ -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
diff --git a/tests/cp/proc-zero-len b/tests/cp/proc-zero-len
index 53abc43f9..cc6fd0fbc 100755
--- a/tests/cp/proc-zero-len
+++ b/tests/cp/proc-zero-len
@@ -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
diff --git a/tests/cp/src-base-dot b/tests/cp/src-base-dot
index 069c1935c..4ec39a873 100755
--- a/tests/cp/src-base-dot
+++ b/tests/cp/src-base-dot
@@ -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
diff --git a/tests/cp/thru-dangling b/tests/cp/thru-dangling
index 62f111587..1c5c12d4c 100755
--- a/tests/cp/thru-dangling
+++ b/tests/cp/thru-dangling
@@ -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