]> arthur.barton.de Git - bup.git/commitdiff
test-import-duplicity: adjust to FreeBSD's rsync output
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 18 Nov 2020 10:56:53 +0000 (11:56 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 22 Nov 2020 20:30:46 +0000 (14:30 -0600)
rsync on FreeBSD now outputs 12 status chars, adjust to
that and simplify the check a little bit.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
t/test-import-duplicity.sh

index 74aabc69e7234fdc894f8e45e3dfc6b4a5cdea02..593e565df29592b83347e64a47e9f734af751011 100755 (executable)
@@ -36,12 +36,13 @@ WVPASS bup restore -C restore/ import-duplicity/latest/
 WVFAIL "$top/t/compare-trees" src/ restore/ > tmp-compare-trees
 WVPASSEQ $(cat tmp-compare-trees | wc -l) 4
 # Note: OS X rsync itemize output is currently only 9 chars, not 11.
+# FreeBSD may output 12 chars instead - accept 9-12
 # Expect something like this (without the leading spaces):
 #   .d..t...... ./
 #   .L..t...... abs-symlink -> /home/foo/bup/t/sampledata/var/abs-symlink-target
 #   .L..t...... b -> a
 #   .L..t...... c -> b
-expected_diff_rx='^\.d\.\.t.\.\.\.\.?\.? \./$|^\.L\.\.t.\.\.\.\.?\.? '
+expected_diff_rx='^\.d\.\.t\.{4,7} \./$|^\.L\.\.t\.{4,7} '
 if ! grep -qE "$expected_diff_rx" tmp-compare-trees; then
     echo -n 'tmp-compare-trees: ' 1>&2
     cat tmp-compare-trees 1>&2