]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Now that PATH is set properly, use ln rather than $LN.
authorJim Meyering <jim@meyering.net>
Mon, 18 Jan 1999 02:57:24 +0000 (02:57 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 18 Jan 1999 02:57:24 +0000 (02:57 +0000)
tests/ln/misc
tests/ln/sf-1

index bf9412aab002f3372e7e2713c639ff45b2a08111..45cedbcd7bf49a68aefbaa5c6f21a5e1ea50f60c 100755 (executable)
@@ -1,11 +1,10 @@
 #!/bin/sh
 
-PATH=../../../src:$PATH
 tmp=t2-ln.$$
 
 if test "$VERBOSE" = yes; then
   set -x
-  $LN --version
+  ln --version
 fi
 
 test_failure=0
@@ -88,6 +87,12 @@ ln --no-dereference -fs $af $ld || fail=1
 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
 
index a3223f2c03815fe7fb6f52431178a34e7f43846e..894144a8ba8f3fae38a848c6b36a63b37b77316c 100755 (executable)
@@ -1,27 +1,19 @@
 #!/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'
@@ -37,7 +29,7 @@ LANG=C
 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 ;;