From 6b0cfcb7cf565b54985663352f0cac64f7f70a22 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 18 Nov 2020 11:56:53 +0100 Subject: [PATCH] test-import-duplicity: adjust to FreeBSD's rsync output rsync on FreeBSD now outputs 12 status chars, adjust to that and simplify the check a little bit. Signed-off-by: Johannes Berg Reviewed-by: Rob Browning --- t/test-import-duplicity.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/test-import-duplicity.sh b/t/test-import-duplicity.sh index 74aabc6..593e565 100755 --- a/t/test-import-duplicity.sh +++ b/t/test-import-duplicity.sh @@ -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 -- 2.39.2