6 use Test::More 'no_plan';
9 # Override exit at BEGIN time before Git::SVN::Utils is loaded
10 # so it will see our local exit later.
11 *CORE::GLOBAL::exit = sub(;$) {
12 return @_ ? CORE::exit($_[0]) : CORE::exit();
16 use Git::SVN::Utils qw(fatal);
20 # Capture the exit code and prevent exit.
22 no warnings 'redefine';
23 local *CORE::GLOBAL::exit = sub { $exit_status = $_[0] || 0 };
25 # Trap fatal's message to STDERR
28 ok open STDERR, ">", \$stderr;
30 fatal "Some", "Stuff", "Happened";
32 is $stderr, "Some Stuff Happened\n";