From 2c2c28e4a3d21f0c5497f69cac2dd45b929f2e69 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Wed, 25 Feb 2015 15:28:21 +0100 Subject: [PATCH] t/test-on.sh: Don't quote "wc -l" output 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 [rlb@defaultvalue.org: adjust commit message; add WVPASS calls] Signed-off-by: Rob Browning Reviewed-by: Rob Browning Tested-by: Rob Browning --- t/test-on.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/test-on.sh b/t/test-on.sh index 61e6dd8..9943b88 100755 --- a/t/test-on.sh +++ b/t/test-on.sh @@ -22,7 +22,7 @@ WVPASS date > src/bar 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" -- 2.39.2