summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ln/misc17
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/ln/misc b/tests/ln/misc
index d4d7fbfaf..26db832ec 100755
--- a/tests/ln/misc
+++ b/tests/ln/misc
@@ -1,17 +1,19 @@
#!/bin/sh
-tmp=t2-ln.$$
-
if test "$VERBOSE" = yes; then
set -x
ln --version
fi
+pwd=`pwd`
+tmp=t2-ln.$$
+trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
+trap '(exit $?); exit' 1 2 13 15
+
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
-
t=tln-symlink
d=tln-subdir
ld=tln-symlink-to-subdir
@@ -113,8 +115,13 @@ fi
rm -rf a symlink hard-to-sym hard-to-dangle
# ===================================================
-cd ..
-../../src/rm -rf $tmp
+# Make sure ln can make simple backups.
+# This was fixed in 4.0.34. Broken in 4.0r.
+touch a || framework_failure=1
+ln --backup=simple --suffix=.orig x a || fail=1
+test -f a.orig || fail=1
+
+# ===================================================
if test $framework_failure = 1; then
echo 'failure in testing framework' 1>&2