Now that PATH is set properly, use rm and cp rather than $RM and $CP.
authorJim Meyering <jim@meyering.net>
Mon, 18 Jan 1999 02:54:36 +0000 (02:54 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 18 Jan 1999 02:54:36 +0000 (02:54 +0000)
tests/cp/backup-1
tests/cp/backup-is-src
tests/cp/no-deref-link1
tests/cp/no-deref-link2
tests/cp/no-deref-link3
tests/cp/same-file

index 3557b57..20da790 100755 (executable)
@@ -1,10 +1,8 @@
 #!/bin/sh
 
-: ${CP=cp}
-
 if test "$VERBOSE" = yes; then
   set -x
-  $CP --version
+  cp --version
 fi
 
 suffix=.b
@@ -18,7 +16,7 @@ echo test > $tmp || fail=1
 
 # Specify both version control and suffix so the environment variables
 # (possibly set by the user running these tests) aren't used.
-$CP --force --backup --version-control=simple --suffix=$suffix $tmp $tmp \
+cp --force --backup --version-control=simple --suffix=$suffix $tmp $tmp \
   || fail=1
 
 test -f $tmp || fail=1
index f2eaa09..13ec992 100755 (executable)
@@ -1,15 +1,12 @@
 #!/bin/sh
 
-: ${CP=cp}
-: ${RM=rm}
-
 if test "$VERBOSE" = yes; then
   set -x
-  $CP --version
+  cp --version
 fi
 
 framework_failure=0
-$RM -f a a~ || framework_failure=1
+rm -f a a~ || framework_failure=1
 echo a > a || framework_failure=1
 echo a-tilde > a~ || framework_failure=1
 
@@ -27,9 +24,9 @@ LANG=C
 export LANG
 
 # This cp command should exit nonzero.
-$CP -b -V simple a~ a > out 2>&1 && fail=1
+cp -b -V simple a~ a > out 2>&1 && fail=1
 
-sed "s,$CP:,XXX:," out > out2
+sed "s,cp:,XXX:," out > out2
 
 cat > exp <<\EOF
 XXX: backing up `a' would destroy source;  `a~' not copied
@@ -37,6 +34,6 @@ EOF
 
 cmp out2 exp || fail=1
 
-$RM -f out out2 exp a a~
+rm -f out out2 exp a a~
 
 exit $fail
index a1a756c..3a85c49 100755 (executable)
@@ -2,11 +2,9 @@
 # FIXME: This test requires ln -s.
 # cp from 3.16 fails this test
 
-: ${CP=cp}
-
 if test "$VERBOSE" = yes; then
   set -x
-  $CP --version
+  cp --version
 fi
 
 rm -rf a b
@@ -21,7 +19,7 @@ fail=0
 
 # It should fail with a message something like this:
 #   ./cp: `a/foo' and `b/foo' are the same file
-$CP -d a/foo b 2>/dev/null
+cp -d a/foo b 2>/dev/null
 
 # Fail this test if the exit status is not 1
 test $? = 1 || fail=1
index 5c194a0..963e5af 100755 (executable)
@@ -2,11 +2,9 @@
 # FIXME: This test requires ln -s.
 # cp from 3.16 fails this test
 
-: ${CP=cp}
-
 if test "$VERBOSE" = yes; then
   set -x
-  $CP --version
+  cp --version
 fi
 
 rm -rf a b
@@ -21,7 +19,7 @@ fail=0
 
 # It should fail with a message something like this:
 #   cp: `a' and `b/foo' are the same file
-$CP -d a b 2>/dev/null
+cp -d a b 2>/dev/null
 
 # Fail this test if the exit status is not 1
 test $? = 1 || fail=1
index 1486948..41910e1 100755 (executable)
@@ -2,11 +2,9 @@
 # FIXME: This test requires ln -s.
 # cp from 3.16 fails this test
 
-: ${CP=cp}
-
 if test "$VERBOSE" = yes; then
   set -x
-  $CP --version
+  cp --version
 fi
 
 rm -rf a b
@@ -18,7 +16,7 @@ fail=0
 
 # It should fail with a message something like this:
 #   cp: `a' and `b' are the same file
-$CP -d a b 2>/dev/null
+cp -d a b 2>/dev/null
 
 # Fail this test if the exit status is not 1
 test $? = 1 || fail=1
index 8d93481..e0b1869 100755 (executable)
@@ -2,12 +2,9 @@
 # Test some of cp's options and how cp handles situations in
 # which a naive implementation might overwrite the source file.
 
-# FIXME: punt for now
-CP=cp
-
 if test "$VERBOSE" = yes; then
   set -x
-  $CP --version
+  cp --version
 fi
 
 LANGUAGE=C; export LANGUAGE
@@ -15,9 +12,6 @@ LANG=C; export LANG
 
 VERSION_CONTROL=numbered; export VERSION_CONTROL
 
-pwd=`pwd`
-PATH=$pwd/../../src:$PATH
-
 actual=actual-$$
 expected=expected-$$
 trap "cd $pwd; rm -rf $actual $expected dir" 0 1 2 3 15
@@ -51,8 +45,8 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do
     case "$args" in *sl2*) ln -s foo sl2;; esac
     (
       (
-       # echo 1>&2 $CP $options $args
-       $CP $options $args 2>.err
+       # echo 1>&2 cp $options $args
+       cp $options $args 2>.err
        echo $? $options
 
        # Normalize the program name in the error output,