BUG 1: didn't report non-error exit A test that enforces a non-zero exit code via "=== N" would succeed when the command under test returned with success (0); only differing exit codes would be correctly reported. Corrected logic so that the check for the exit code would always run, not just when the command under test failed. BUG 2: too early evaluation of $? In the test expression, the evaluation of $? must be deferred until the test expression itself is evaluated. Escaping $? to prevent premature evaluation in the context of the expression definition.
14 KiB
14 KiB