Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/lib/Filter/Simple/t/filter_only.t

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


BEGIN {
    if ($ENV{PERL_CORE}) {
        chdir('t') if -d 't';
	@INC = qw(lib/Filter/Simple ../lib);
    }
}

use FilterOnlyTest qr/not ok/ => "ok", "bad" => "ok", fail => "die";
print "1..9\n";

sub fail { print "ok ", $_[0], "\n" }
sub ok { print "ok ", $_[0], "\n" }

print "not ok 1\n";
print "bad 2\n";

fail(3);
&fail(4);

print "not " unless "whatnot okapi" eq "whatokapi";
print "ok 5\n";

ok 7 unless not ok 6;

no FilterOnlyTest; # THE FUN STOPS HERE

print "not " unless "not ok" =~ /^not /;
print "ok 8\n";

print "not " unless "bad" =~ /bad/;
print "ok 9\n";

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.