]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
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 3557b57b2ba9d845d1b3e9ade85b2136f5b3d7a0..20da790673ea85f160d29400aede5ab1c569b27e 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 f2eaa090eff5f0e5923812e719f06335011545c6..13ec99290ca179c38da1bc03cc9e6bab724a6921 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 a1a756c68748599c196464ee857b92e87657b9a9..3a85c4994ed7dc175241e2e1f2bce456756999a2 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 5c194a080973c267009162064522b932f65a4a5c..963e5af221af47b9e6f9e773f848fca7f4032c87 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 1486948607b597ba3e62035a5b0798db8ce11cd0..41910e1a343635a4625362e11c498760ac98597f 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 8d93481db509da8cc3a10c0b8e5377368d58c4ea..e0b18696aa5fe599ef04480d330a046227499644 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,