This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RE: Failing tests on VMS blead@26652
[perl5.git] / t / comp / asstcompat.t
CommitLineData
aefc56c5
SF
1#!./perl
2
3my $i = 1;
4sub ok {
5 my $ok = shift;
6 print( ($ok ? '' : 'not '), "ok $i", (@_ ? " - @_" : ''), "\n");
7 $i++;
8}
9
10print "1..7\n";
11
12# 1
13use base 'assertions::compat';
14ok(eval "sub assert_foo : assertion { 0 } ; 1", "handle assertion attribute");
15
16use assertions::activate 'Foo';
17
18# 2
19use assertions::compat asserting_2 => 'Foo';
20ok(asserting_2, 'on');
21
22# 3
23use assertions::compat asserting_3 => 'Bar';
24ok(!asserting_3, 'off');
25
26# 4
27use assertions::compat asserting_4 => '_ || Bar';
28ok(!asserting_4, 'current off or off');
29
30# 5
31use assertions::compat asserting_5 => '_ || Foo';
32ok(asserting_5, 'current off or on');
33
34# 6
35use assertions::compat asserting_6 => '_ || Bar';
36ok(asserting_6, 'current on or off');
37
38# 7
39use assertions::compat asserting_7 => '_ && Foo';
40ok(asserting_7, 'current on and on');