use v6; use Test; # plain http link # L plan 75; # Link so Synopsis # L is(undef, undef, "undef is equal to undef"); ok(!defined(undef), "undef is not defined"); { my $a; ok(!defined($a), "uninitialized lexicals are undef"); } # Another plain http link # L # Link to Synopsys in subdirectory # L { my @ary = "arg1"; my $a = @ary.pop; ok(defined($a), "pop from array"); $a = @ary.pop; ok(!defined($a), "pop from empty array"); } # Multiline smartlink # L { my ($num, $alpha); my ($rx1, $rx2); eval ' $rx1 = rx '; ok(defined($num), '{$_}: successful hypothetical'); } # subroutines { sub bar ($bar, $baz?, :$quux) { is($bar, "BAR", "defined param"); # sanity # internal legacy smartlink # L<> ok(!defined($baz), "unspecified optional param"); # internal Synopsys smartlink # L ok(!defined($quux), "unspecified optional param"); } bar("BAR"); } # Smartlink to some other file (not synopsys) but either Module.pm or Module.pod # L flunk('FIXME: parsefail'); # Smartlink to some other file (not synopsys) but either Module.pm or Module.pod # L is((undef) + 1, 1, 'undef + 1'); is(1 + (undef), 1, '1 + undef'); # another http link # L<"http://colabti.de/irclogger/irclogger_log/perl6?date=2006-09-12,Tue&sel=145#l186"> is ?(@(undef,)), Bool::False, '?(@(undef,)) is false'; # L is ?(list(undef,)), Bool::False, '?(@(undef,)) is false';