This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
expect -k to be overloadable on Win32
[perl5.git] / dist / Filter-Simple / t / filter_only.t
1 BEGIN {
2     unshift @INC, 't/lib/';
3 }
4
5 use Filter::Simple::FilterOnlyTest qr/not ok/ => "ok", 
6                                    "bad" => "ok", fail => "die";
7 print "1..9\n";
8
9 sub fail { print "ok ", $_[0], "\n" }
10 sub ok { print "ok ", $_[0], "\n" }
11
12 print "not ok 1\n";
13 print "bad 2\n";
14
15 fail(3);
16 &fail(4);
17
18 print "not " unless "whatnot okapi" eq "whatokapi";
19 print "ok 5\n";
20
21 ok 7 unless not ok 6;
22
23 =begin scrumbly
24
25 =end scrumbly
26
27 shromple
28
29 =cut
30
31 =for us
32
33 shromple again
34
35 =cut
36
37 no Filter::Simple::FilterOnlyTest; # THE FUN STOPS HERE
38
39 print "not " unless "not ok" =~ /^not /;
40 print "ok 8\n";
41
42 print "not " unless "bad" =~ /bad/;
43 print "ok 9\n";