--- embedaddon/rsync/testsuite/itemize.test 2012/02/17 15:09:30 1.1 +++ embedaddon/rsync/testsuite/itemize.test 2021/03/17 00:32:36 1.1.1.3 @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2005 by Wayne Davison +# Copyright (C) 2005-2020 Wayne Davison # This program is distributable under the terms of the GNU GPL (see # COPYING). @@ -17,9 +17,9 @@ outfile="$scratchdir/rsync.out" makepath "$fromdir/foo" makepath "$fromdir/bar/baz" -cp -p "$srcdir/configure.ac" "$fromdir/foo/config1" -cp -p "$srcdir/config.h.in" "$fromdir/foo/config2" -cp -p "$srcdir/rsync.h" "$fromdir/bar/baz/rsync" +cp_p "$srcdir/configure.ac" "$fromdir/foo/config1" +cp_p "$srcdir/config.sub" "$fromdir/foo/config2" +cp_p "$srcdir/rsync.h" "$fromdir/bar/baz/rsync" chmod 600 "$fromdir"/foo/config? "$fromdir/bar/baz/rsync" umask 0 ln -s ../bar/baz/rsync "$fromdir/foo/sym" @@ -40,7 +40,7 @@ case "$RSYNC" in T=.T ;; *) - if $RSYNC --version | grep ", symtimes" >/dev/null; then + if $RSYNC --version | grep "[, ] symtimes" >/dev/null; then T=.t else T=.T @@ -66,7 +66,7 @@ diff $diffopt "$chkfile" "$outfile" || test_fail "test # Ensure there are no accidental directory-time problems. $RSYNC -a -f '-! */' "$fromdir/" "$todir" -cp -p "$srcdir/configure.ac" "$fromdir/foo/config2" +cp_p "$srcdir/configure.ac" "$fromdir/foo/config2" chmod 601 "$fromdir/foo/config2" $RSYNC -iplrH "$fromdir/" "$todir/" \ | tee "$outfile" @@ -79,12 +79,12 @@ EOT diff $diffopt "$chkfile" "$outfile" || test_fail "test 2 failed" $RSYNC -a -f '-! */' "$fromdir/" "$todir" +cp_p "$srcdir/config.sub" "$fromdir/foo/config2" sleep 1 # For directory mod below to ensure time difference rm "$todir/foo/sym" umask 0 ln -s ../bar/baz "$todir/foo/sym" umask 022 -cp -p "$srcdir/config.h.in" "$fromdir/foo/config2" chmod 600 "$fromdir/foo/config2" chmod 777 "$todir/bar/baz/rsync" @@ -99,7 +99,7 @@ cLc$T.$dots foo/sym -> ../bar/baz/rsync EOT diff $diffopt "$chkfile" "$outfile" || test_fail "test 3 failed" -cp -p "$srcdir/configure.ac" "$fromdir/foo/config2" +cp_p "$srcdir/configure.ac" "$fromdir/foo/config2" chmod 600 "$fromdir/foo/config2" # Lack of -t is for unchanged hard-link stress-test! $RSYNC -vvplrH "$fromdir/" "$todir/" \ @@ -108,9 +108,9 @@ filter_outfile cat <"$chkfile" bar/baz/rsync is uptodate foo/config1 is uptodate -foo/config2 foo/extra is uptodate foo/sym is uptodate +foo/config2 EOT diff $diffopt "$chkfile" "$outfile" || test_fail "test 4 failed" @@ -203,8 +203,8 @@ bar/baz/rsync is uptodate foo/ is uptodate foo/config1 is uptodate foo/config2 is uptodate -foo/extra => foo/config1 foo/sym $is_uptodate +foo/extra => foo/config1 EOT diff $diffopt "$chkfile" "$outfile" || test_fail "test 10 failed"