]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tests: initialize fail=0 to avoid "unary operator expected" errors
authorBernhard Voelker <mail@bernhard-voelker.de>
Thu, 21 Jun 2018 22:29:00 +0000 (00:29 +0200)
committerBernhard Voelker <mail@bernhard-voelker.de>
Sat, 23 Jun 2018 20:37:42 +0000 (22:37 +0200)
commit5fb8eb091fe9b294c91dcaf7af1875835c3d69ba
treed400a495aa4db291db5b296ec99c432acbd34a1a
parentcb1f253e630c41e2f6b278a6a2592edb9cad97ea
tests: initialize fail=0 to avoid "unary operator expected" errors

With an uninitialized variable 'fail', the unquoted use like
  test $fail = 1
lead to the shell error
  "unary operator expected".

The uninitialized 'fail' variable was a side effect of
  https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=e91c0d4f9
which was pulled into coreutils-v8.26 with
  https://git.sv.gnu.org/cgit/coreutils.git/commit/?id=ef9650170
Coreutils test code relied and relies on 'fail' to be initialized,
so initialize that variable here.

* tests/local.mk (TESTS_ENVIRONMENT): Initialize fail=0.
tests/local.mk