#!/bin/sh
-: ${CP=cp}
-
if test "$VERBOSE" = yes; then
set -x
- $CP --version
+ cp --version
fi
suffix=.b
# 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
#!/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
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
cmp out2 exp || fail=1
-$RM -f out out2 exp a a~
+rm -f out out2 exp a a~
exit $fail
# 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
# 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
# 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
# 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
# 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
# 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
# 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
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
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,