File: missing.test

package info (click to toggle)
rsync 3.0.7-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,284 kB
  • ctags: 3,471
  • sloc: ansic: 35,640; sh: 4,916; perl: 1,466; makefile: 297; python: 83
file content (27 lines) | stat: -rw-r--r-- 954 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/sh

# This program is distributable under the terms of the GNU GPL (see
# COPYING).

# Test three bugs fixed by my redoing of the missing_below logic.

. $srcdir/testsuite/rsync.fns

makepath "$fromdir/subdir" "$todir"
echo data >"$fromdir/subdir/file"
echo data >"$todir/other"

# Test 1: Too much "not creating new..." output on a dry run
$RSYNC -n -r --ignore-non-existing -vv "$fromdir/" "$todir/" | tee "$scratchdir/out"
if grep 'not creating new.*subdir/file' "$scratchdir/out" >/dev/null; then
	test_fail 'test 1 failed'
fi

# Test 2: Attempt to make a fuzzy dirlist for a dir not created on a dry run
$RSYNC -n -r -R --no-implied-dirs -y "$fromdir/./subdir/file" "$todir/" \
	|| test_fail 'test 2 failed'

# Test 3: --delete-after pass skipped when last dir is dry-missing
$RSYNC -n -r --delete-after -i "$fromdir/" "$todir/" | tee "$scratchdir/out"
grep '^\*deleting * other' "$scratchdir/out" >/dev/null \
	|| test_fail 'test 3 failed'