test-lib-main.sh: enable line numbers when using bash
commit4781d5e338bf38c826f28a5627faccecdd33caba
authorKyle J. McKay <mackyle@gmail.com>
Sat, 27 May 2017 06:06:46 +0000 (26 23:06 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Sat, 27 May 2017 06:06:46 +0000 (26 23:06 -0700)
treeb365f6e9e40bff7b961896e118f47106cbe82d94
parent4ad4bc79233f8bbfa367c69c0d319d238c4d6c67
test-lib-main.sh: enable line numbers when using bash

Getting line numbers into the output requires use of
command aliases.  All the other shells except bash always
have them enabled.

If the "shopt" command is supported, attempt to enable
alias expansion using the necessary bashism so that line
numbers will show up properly in the output.

Cache the result of the check for the shopt command when
caching is enabled.

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