2 # Before coreutils-4.5.3, --target-dir didn't work with one file.
3 # It would create the desired link, but would fail with a diagnosis like this:
4 # ln: `d/.': cannot overwrite directory
5 # Based on a test case from Dmitry V. Levin.
7 if test "$VERBOSE" = yes; then
13 t0
=`echo "$0"|sed 's,.*/,,'`.tmp
; tmp
=$t0/$$
14 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
15 trap '(exit $?); exit $?' 1 2 13 15
18 mkdir
-p $tmp || framework_failure
=1
19 cd $tmp || framework_failure
=1
20 mkdir d || framework_failure
=1
22 if test $framework_failure = 1; then
23 echo "$0: failure in testing framework" 1>&2
29 ln -s --target-dir=d ..
/f || fail
=1
31 (exit $fail); exit $fail