Some wc(1) implementations, for example on OS X, prefix the numeric
output with spaces. So don't quote this output (and don't treat it
as a string) to not confuse WVPASSEQ.
This fixes the following error of "make check":
Comparing:
2
--
2
! t/test-on.sh:25 ' 2' = '2' FAILED
2.108s ok
called from t/test-on.sh:25 WVPASSEQ 2 2
make[1]: *** [runtests-cmdline] Error 1
! Program returned non-zero exit code (2) FAILED
WvTest: 3007 tests, 1 failure, total time 84.013s.
Reported by Pedro Estarque, thanks!
Signed-off-by: Alexander Barton <alex@barton.de>
[rlb@defaultvalue.org: adjust commit message; add WVPASS calls]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
WVPASS bup random 1k > src/baz
WVPASS bup on - index src
WVPASS bup on - save -ctn src src > get.log
-WVPASSEQ "$(cat get.log | wc -l)" 2
+WVPASSEQ $(WVPASS cat get.log | WVPASS wc -l) 2
tree_id=$(WVPASS awk 'FNR == 1' get.log) || exit $?
commit_id=$(WVPASS awk 'FNR == 2' get.log) || exit $?
WVPASS git ls-tree "$tree_id"