]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
*** empty log message ***
authorJim Meyering <jim@meyering.net>
Sat, 23 Oct 1999 13:18:10 +0000 (13:18 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 23 Oct 1999 13:18:10 +0000 (13:18 +0000)
tests/touch/dangling-symlink [new file with mode: 0755]

diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink
new file mode 100755 (executable)
index 0000000..c7cde33
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Make sure touch can create a file through a dangling symlink.
+# This was broken in the 4.0[e-i] test releases.
+
+if test "$VERBOSE" = yes; then
+  set -x
+  touch --version
+fi
+
+fail=0
+ln -s touch-target t-symlink
+
+# This used to infloop.
+touch t-symlink || fail=1
+
+test -f touch-target || fail=1
+rm -f touch-target t-symlink
+
+exit $fail