File: basic.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 (21 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
#
use strict;
use warnings;

use Test::More tests => 1 + 6;

BEGIN {
  use_ok( 'Test::Exit' );
}

# Test passes
is exit_code { exit 75; }, 75, "exit_code";

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

exits_zero { exit; } "exit with no argument exits zero";