'mkdir -p'.
cp ${FROM}/${F1} ${TO}/ThisShouldGo
runtest " --delete" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
-LONGDIR=${FROM}/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job
-mkdir -p ${LONGDIR}
-date > ${LONGDIR}/1
-ls -la / > ${LONGDIR}/2
-runtest "long paths" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
-
rm -rf ${TO}
mkdir -p ${FROM}2/dir/subdir
cp -a ${FROM}/dir/subdir/subsubdir ${FROM}2/dir/subdir
--- /dev/null
+#!/bin/sh
+
+# Copyright (C) 1998,1999 Philip Hands <phil@hands.com>
+# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
+#
+# This program is distributable under the terms of the GNU GPL (see COPYING)
+
+
+. "$suitedir/rsync.fns"
+
+hands_setup
+
+LONGDIR=${FROM}/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job/This-is-a-directory-with-a-stupidly-long-name-created-in-an-attempt-to-provoke-an-error-found-in-2.0.11-that-should-hopefully-never-appear-again-if-this-test-does-its-job
+
+makepath ${LONGDIR}
+date > ${LONGDIR}/1
+ls -la / > ${LONGDIR}/2
+checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}
runtest() {
echo $ECHO_N "Test $1: $ECHO_C"
- eval "$2"
+ if eval "$2"
+ then
+ echo "${ECHO_T} done."
+ return 0
+ else
+ echo "${ECHO_T} failed!"
+ return 1
+ fi
}
printmsg() {
# Build test directories TO and FROM, with FROM full of files.
hands_setup() {
+ # Clean before creation
+ rm -rf $FROM
+ rm -rf $TO
+
[ -d $FROM ] || mkdir $FROM
[ -d $TO ] || mkdir $TO
( cd $3 ; ls -laR ) > ${TMP}/ls-to 2>>${log}
diff -c ${TMP}/ls-from ${TMP}/ls-to >>${log} 2>&1 || failed=YES
if [ -z "${failed}" ] ; then
- echo "${ECHO_T} done."
rm $log
return 0
else
- echo "${ECHO_T} failed!"
cat ${log}
rm ${log}
return 1