mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-15 11:52:15 +02:00
Now that PATH is set properly, use rm and cp rather than $RM and $CP.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user