summaryrefslogtreecommitdiff
path: root/tests/mv/atomic
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-05-11 08:18:34 +0000
committerJim Meyering <jim@meyering.net>2006-05-11 08:18:34 +0000
commitb7c2ae47f021e526fc74ba0ccd212548c8b22ef9 (patch)
treef26f330ed3f7f688cc54d01517f07671e1f5248e /tests/mv/atomic
parent96a2e1be0470962b821e837c8d3e851702a3c9a0 (diff)
downloadcoreutils-b7c2ae47f021e526fc74ba0ccd212548c8b22ef9.tar.xz
ensure that mv did what it's supposed to
Diffstat (limited to 'tests/mv/atomic')
-rwxr-xr-xtests/mv/atomic6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/mv/atomic b/tests/mv/atomic
index 45e09b85f..b0707ff54 100755
--- a/tests/mv/atomic
+++ b/tests/mv/atomic
@@ -44,6 +44,12 @@ strace -qe unlink mv -T s1 s2 > out 2>&1 || fail=1
cat <<\EOF > exp || fail=1
EOF
+# Ensure that the source, s1, is gone.
+ls -dl s1 > /dev/null 2>&1 && fail=1
+
+# Ensure that the destination, s2, contains the link from s1.
+test "`readlink s2`" = t1 || fail=1
+
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null