#!/bin/sh
-PATH=../../../src:$PATH
tmp=t2-ln.$$
if test "$VERBOSE" = yes; then
set -x
- $LN --version
+ ln --version
fi
test_failure=0
test -f $ld || fail=1
rm -rf $d $f $ld
+# Try to create a symlink with backup where the destination file exists
+# and the backup file name is a hard link to the destination file.
+touch a b || test_failure=1
+ln b b~ || test_failure=1
+ln -V simple -f -b a b || fail=1
+
cd ..
../../src/rm -rf $tmp
#!/bin/sh
-: ${LN=ln}
test=sf-1
if test "$VERBOSE" = yes; then
set -x
- $LN --version
+ ln --version
fi
tmp=t-ln.$$
-# We're going to LN from a subdir. Prepend ../ if $LN is not an
-# absolute file name.
-case $LN in
- /*) ;;
- *) LN=../$LN
-esac
-
test_failure=0
mkdir $tmp || test_failure=1
cd $tmp || test_failure=1
echo foo > a || test_failure=1
-$LN -s . b || test_failure=1
+ln -s . b || test_failure=1
if test $test_failure = 1; then
echo 'failure in testing framework'
export LANG
fail=0
-$LN -sf a b > err 2>&1 && fail=1
+ln -sf a b > err 2>&1 && fail=1
case `cat err` in
*'are the same file') ;;
*) fail=1 ;;