my $rv = test_cmd( MyApp => \@argv );
test_cmd invokes the app with given argv as if would be invoked from
command line and captures the output, the return values and exit code.
Some minor tests are done to prove whether class matches, execute succeeds,
command_name and command_chain are not totally scrambled.
It returns an object with following attributes/accessors:
Name of package of App
Name of executed (1st level) command
Content of stdout
Content of stderr
Content of merged stdout and stderr
the exception thrown by running the application (if any)
return values from execute
0 on success, $! when error occurred and $! available, -1 otherwise
my $rv = test_cmd_ok( MyApp => \@argv );
Runs test_cmd and expects it being successful - command_name must be in
Returns the same object test_cmd returns.
If an error occurred, no additional test is done (behavior as test_cmd).