File: exception-handling.t

package info (click to toggle)
libtest-exit-perl 0.11-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 104 kB
  • sloc: perl: 84; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 230 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
#
use strict;
use warnings;

use Test::More tests => 3;
use Test::Exit;

exits_ok { eval { exit 1; } } "exits_ok";
exits_nonzero { eval { exit 42; } } "exits_nonzero";
exits_zero { eval { exit 0; } } "exits_zero";