]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
ensure that mv did what it's supposed to
authorJim Meyering <jim@meyering.net>
Thu, 11 May 2006 08:18:34 +0000 (08:18 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 11 May 2006 08:18:34 +0000 (08:18 +0000)
tests/mv/atomic

index 45e09b85f1a9d7f1b1a0ab41ae748ca6f6b402cb..b0707ff5431bc294f88b0ade3f6803f9ded0af0c 100755 (executable)
@@ -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