From: Avery Pennarun Date: Mon, 30 May 2011 00:31:43 +0000 (-0400) Subject: t/test.sh: 'ls' on NetBSD sets -A by default as root; work around it. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=51bd5832b391f4c128cc42a3a5970733775f1ba7;p=packages%2Fb%2Fbup.git t/test.sh: 'ls' on NetBSD sets -A by default as root; work around it. 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 --- diff --git a/t/test.sh b/t/test.sh index b553167..6058e44 100755 --- 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