More testsuite cleanups. Now I hope we cope without 'cp -a', though
authorMartin Pool <mbp@samba.org>
Thu, 6 Sep 2001 06:21:15 +0000 (06:21 +0000)
committerMartin Pool <mbp@samba.org>
Thu, 6 Sep 2001 06:21:15 +0000 (06:21 +0000)
we still need 'cp -p'.

testsuite/hands.test
testsuite/rsync.fns

index 1c321d4..01f19bc 100644 (file)
@@ -16,20 +16,13 @@ runtest "basic operation" 'checkit "$RSYNC -av ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 ln ${FROM}/filelist ${FROM}/dir
 runtest "hard links" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 ln ${FROM}/filelist ${FROM}/dir
 runtest "hard links" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
-rm ${TO}/${F1}
+rm ${TO}/text
 runtest "one file" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 runtest "one file" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
-echo "extra line" >> ${TO}/${F1}
+echo "extra line" >> ${TO}/text
 runtest "extra data" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 runtest "extra data" 'checkit "$RSYNC -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
-cp ${FROM}/${F1} ${TO}/ThisShouldGo
+cp ${FROM}/text ${TO}/ThisShouldGo
 runtest " --delete" 'checkit "$RSYNC --delete -avH ${FROM}/ ${TO}" ${FROM}/ ${TO}'
 
 runtest " --delete" '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
-cp ${FROM}/dir/* ${FROM}2/dir  || :
-runtest "excludes" 'checkit "$RSYNC -vv -Hlrt --delete --include /dir/ --include /dir/\* --include /dir/\*/subsubdir  --include /dir/\*/subsubdir/\*\* --exclude \*\* ${FROM}/dir ${TO}" ${FROM}2/ ${TO}'
-rm -r ${FROM}2
-
 checkforlogs ${LOG}.?
 checkforlogs ${LOG}.?
index a583c15..64c6f48 100644 (file)
@@ -21,7 +21,6 @@
 TMP="$scratchdir"
 FROM=${TMP}/from
 TO=${TMP}/to
 TMP="$scratchdir"
 FROM=${TMP}/from
 TO=${TMP}/to
-F1=text1
 LOG=${TMP}/log
 RSYNC="$rsync_bin"
 
 LOG=${TMP}/log
 RSYNC="$rsync_bin"
 
@@ -68,17 +67,17 @@ hands_setup() {
     mkdir ${FROM}/emptydir
 
     # a hundred lines of text or so
     mkdir ${FROM}/emptydir
 
     # a hundred lines of text or so
-    ls -lR $(srcdir) >${FROM}/filelist
+    ls -lR ${srcdir} > ${FROM}/filelist
 
     # This might fail on systems that don't have -n
     echo $ECHO_N "This file has no trailing lf$ECHO_C" > ${FROM}/nolf
     umask 0
     ln -s nolf ${FROM}/nolf-symlink
 
     # This might fail on systems that don't have -n
     echo $ECHO_N "This file has no trailing lf$ECHO_C" > ${FROM}/nolf
     umask 0
     ln -s nolf ${FROM}/nolf-symlink
-    umask 077
+    umask 022
 
 
-    cat $srcdir/*.c > ${FROM}/${F1}
+    cat $srcdir/*.c > ${FROM}/text
     mkdir ${FROM}/dir
     mkdir ${FROM}/dir
-    cp ${FROM}/${F1} ${FROM}/dir
+    cp ${FROM}/text ${FROM}/dir
     mkdir ${FROM}/dir/subdir
     mkdir ${FROM}/dir/subdir/subsubdir
     ls -ltr /etc > ${FROM}/dir/subdir/subsubdir/etc-ltr-list
     mkdir ${FROM}/dir/subdir
     mkdir ${FROM}/dir/subdir/subsubdir
     ls -ltr /etc > ${FROM}/dir/subdir/subsubdir/etc-ltr-list