Annotation of embedaddon/rsync/testsuite/mkpath.test, revision 1.1.1.1

1.1       misho       1: #!/bin/sh
                      2: 
                      3: . "$suitedir/rsync.fns"
                      4: 
                      5: makepath "$fromdir"
                      6: makepath "$todir"
                      7: 
                      8: cp_p "$srcdir/rsync.h" "$fromdir/text"
                      9: cp_p "$srcdir/configure.ac" "$fromdir/extra"
                     10: 
                     11: cd "$tmpdir"
                     12: 
                     13: deep_dir=to/foo/bar/baz/down/deep
                     14: 
                     15: # Check that we can create several levels of dest dir
                     16: $RSYNC -aiv --mkpath from/text $deep_dir/new
                     17: test -f $deep_dir/new || test_fail "'new' file not found in $deep_dir dir"
                     18: rm -rf to/foo
                     19: 
                     20: $RSYNC -aiv --mkpath from/text $deep_dir/
                     21: test -f $deep_dir/text || test_fail "'text' file not found in $deep_dir dir"
                     22: rm $deep_dir/text
                     23: 
                     24: # Make sure we can handle an existing path
                     25: mkdir $deep_dir/new
                     26: $RSYNC -aiv --mkpath from/text $deep_dir/new
                     27: test -f $deep_dir/new/text || test_fail "'text' file not found in $deep_dir/new dir"
                     28: rm -rf to/foo
                     29: 
                     30: # Try the tests again with multiple source args
                     31: $RSYNC -aiv --mkpath from/ $deep_dir
                     32: test -f $deep_dir/extra || test_fail "'extra' file not found in $deep_dir dir"
                     33: rm -rf to/foo
                     34: 
                     35: $RSYNC -aiv --mkpath from/ $deep_dir/
                     36: test -f $deep_dir/text || test_fail "'text' file not found in $deep_dir dir"
                     37: 
                     38: # Make sure that we can handle no path
                     39: $RSYNC -aiv --mkpath from/text to_text
                     40: test -f to_text || test_fail "'to_text' file not found in current dir"
                     41: 
                     42: # The script would have aborted on error, so getting here means we've won.
                     43: exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>