Add test "t.cp-a".

parent 889f32e3
......@@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS=foreign
TESTS = \
t.chmod_dev \
t.cp-a \
t.echoarg \
t.falsereturn \
t.mknod \
......
#!/bin/sh
set -e
echo cp-atest:
TMP="$tmp"
export PATH
umask 022
if test ! -d $TMP; then
mkdir $TMP
fi
cd $TMP;
touch empty
chmod 0644 empty
cp -a empty empty-a
cp -r empty empty-r
empty_mode=`stat -c %a empty`
empty_a_mode=`stat -c %a empty-a`
empty_r_mode=`stat -c %a empty-r`
if ! [ "${empty_mode}" = "644" ]
then
echo "'chmod' failed '${empty_mode}'">&2
exit 1
fi
if ! [ "${empty_mode}" = "${empty_a_mode}" ]
then
echo "'cp -a' sanity check failed">&2
exit 2
fi
if ! [ "${empty_mode}" = "${empty_r_mode}" ]
then
echo "'cp -r' sanity check failed">&2
exit 3
fi
ls -l empty*
rm -f empty*
#!/bin/sh
. ./defs || exit 1
run_fakeroot -- ${srcdir}/cp-atest
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment