]> arthur.barton.de Git - bup.git/blobdiff - t/test-meta.sh
Add bup prune-older command
[bup.git] / t / test-meta.sh
index 3f7f3a677f375a0355c7063968882252db7ed280..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
@@ -417,13 +420,13 @@ WVSTART 'meta --no-recurse'
     WVPASS mkdir src/foo
     WVPASS touch src/foo/{1,2,3}
     WVPASS bup meta -cf src.meta src
-    WVPASSEQ "$(LC_ALL=C; bup meta -tf src.meta | sort)" "src/
+    WVPASSEQ "$(bup meta -tf src.meta | LC_ALL=C sort)" "src/
 src/foo/
 src/foo/1
 src/foo/2
 src/foo/3"
     WVPASS bup meta --no-recurse -cf src.meta src
-    WVPASSEQ "$(LC_ALL=C; bup meta -tf src.meta | sort)" "src/"
+    WVPASSEQ "$(bup meta -tf src.meta | LC_ALL=C sort)" "src/"
     WVPASS rm -r "$tmpdir"
 ) || exit $?