test-lib-main.sh: introduce TESTLIB_TEST_NO_SUBSHELL
By default the testing library runs the script code passed to
the test_expect_.../test_tolerate_... functions in a subshell
so that all failures are properly caught and reported and so
that the test code can change HOME, PATH, etc. with impunity.
However, this precludes having the script code make changes to
variables which are expected to persist for inspection.
Generally using a subshell is a good thing since it prevents
unexpected perversion of the testing environment.
However, tests that require a perverted environment can set
TESTLIB_TEST_NO_SUBSHELL to a non-empty value and the code
will no longer be evaluated in a subshell. Changes to the
value of TESTLIB_TEST_NO_SUBSHELL are effective with the next
test_expect_.../test_tolerate_... call.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>