This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Filter::Simple 0.70.
[perl5.git] / lib / Filter / Simple / t / filter_only.t
CommitLineData
dfa18578
JH
1use FilterOnlyTest qr/not ok/ => "ok", "bad" => "ok", fail => "die";
2print "1..9\n";
3
4sub fail { print "ok ", $_[0], "\n" }
5sub ok { print "ok ", $_[0], "\n" }
6
7print "not ok 1\n";
8print "bad 2\n";
9
10fail(3);
11&fail(4);
12
13print "not " unless "whatnot okapi" eq "whatokapi";
14print "ok 5\n";
15
16ok 7 unless not ok 6;
17
18no FilterOnlyTest; # THE FUN STOPS HERE
19
20print "not " unless "not ok" =~ /^not /;
21print "ok 8\n";
22
23print "not " unless "bad" =~ /bad/;
24print "ok 9\n";