]> arthur.barton.de Git - bup.git/commitdiff
t/test.sh: 'ls' on NetBSD sets -A by default as root; work around it.
authorAvery Pennarun <apenwarr@gmail.com>
Mon, 30 May 2011 00:31:43 +0000 (20:31 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 30 May 2011 00:36:27 +0000 (20:36 -0400)
We have to undo it by grepping out any dotfiles.  (Normal OSes don't
auto-set -A, but this is harmless there.)

Reported by Thomas Klausner.  Fix suggested by Gabriel Filion.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
t/test.sh

index b553167977280b7b918eedd5d5d59bc6a0b6b9ab..6058e44c55a260eb01daaaa1ce2d8d3c4d7aec28 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -446,7 +446,11 @@ mkdir $D
 WVPASS bup init
 WVPASS bup index $TOP/Documentation
 WVPASS bup save -n compression -0 --strip $TOP/Documentation
-WVPASSEQ "$(bup ls compression/latest/ | sort)" "$(ls $TOP/Documentation | sort)"
+# 'ls' on NetBSD sets -A by default when running as root, so we have to undo
+# it by grepping out any dotfiles.  (Normal OSes don't auto-set -A, but this
+# is harmless there.)
+WVPASSEQ "$(bup ls compression/latest/ | sort)" \
+        "$(ls $TOP/Documentation | grep -v '^\.' | sort)"
 COMPRESSION_0_SIZE=$(du -s $D | cut -f1)
 
 D=compression9.tmp