]> arthur.barton.de Git - bup.git/commitdiff
test-meta: loosen expected rsync diff pattern
authorRob Browning <rlb@defaultvalue.org>
Sat, 11 Jun 2016 17:15:21 +0000 (12:15 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 11 Jun 2016 17:27:06 +0000 (12:27 -0500)
Homebrew's rsync produces 12 status characters, not 11.

Thanks to ilovezfs for reporting the problem and helping test the fix.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
t/test-meta.sh

index 1170d71b3900fcd1f981847a667431329b93afa6..803b61af090fa09c1b31f566488fc9501048b742 100755 (executable)
@@ -171,8 +171,11 @@ WVSTART 'metadata save/restore (general)'
     # Check that the only difference is the top dir.
     WVFAIL $TOP/t/compare-trees -c src/var/ src-restore/ > tmp-compare-trees
     WVPASSEQ $(cat tmp-compare-trees | wc -l) 1
-    # Note: OS X rsync itemize output is currently only 9 chars, not 11.
-    expected_diff_rx='^\.d\.\.t.\.\.\.\.?\.? \./$'
+    # The number of rsync status characters varies, so accept any
+    # number of trailing dots.  For example OS X native rsync produces
+    # 9, but Homebrew's produces 12, while on other platforms, 11 is
+    # common.
+    expected_diff_rx='^\.d\.\.t\.\.\.(\.)+ \./$'
     if ! grep -qE "$expected_diff_rx" tmp-compare-trees; then
         echo -n 'tmp-compare-trees: ' 1>&2
         cat tmp-compare-trees 1>&2