test-lib-functions: add wc wrapper
commit71beecc964b569b266f32763a5ecb252b168bbe5
authorKyle J. McKay <mackyle@gmail.com>
Fri, 2 Jun 2017 01:02:28 +0000 (1 18:02 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Fri, 2 Jun 2017 01:02:28 +0000 (1 18:02 -0700)
tree936cc4615209eebbf5325775fd76c73a6348c1ed
parent05a725f355d0f0c1c4c8a15e9c87b211f1a597e2
test-lib-functions: add wc wrapper

Some systems' wc produces output with leading spaces that can
confuse test scripts.

Introduce a wc wrapper function that conveniently and transparently
strips those spaces off so that the wc command can be used directly
without needing to be concerned about non-POSIX wc implementations.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
t/README-TESTLIB
t/test-lib-functions.sh