Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
use 5.014;
use Test::Most;
use Test::Trap;
# Evaluating Test::Trap
# Wish the global $trap was returned by the exported trap method.
my @response = trap {
say {*STDOUT} 'stdout';
say {*STDERR} 'stderr';
exit 1;
};
is $trap->exit, 1, 'exit code is 1';
is $trap->stdout, "stdout\n", '$trap->stdout, "stdout\n"';
is $trap->stderr, "stderr\n", '$trap->stderr, "stderr\n"';
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.