# is unfortunately not a trivial task.
#
# WARNING: these tests are obfuscated. Do not get frustrated.
-# Ask Abigail <abigail@foad.org>, or use the Deparse or Concise
+# Ask Abigail <abigail@abigail.be>, or use the Deparse or Concise
# modules (the former parses Perl to Perl, the latter shows the
# op syntax tree) like this:
# ./perl -Ilib -MO=Deparse foo.pl
#
BEGIN {
- if (ord("A") == 193) {
- print "1..0 # Skip: EBCDIC\n"; # For now, until someone has time.
- exit(0);
- }
chdir 't' if -d 't';
@INC = '../lib';
require "./test.pl";
+ skip_all('EBCDIC') if $::IS_EBCDIC;
undef &skip;
}
-skip_all "Unhappy on MacOS" if $^O eq 'MacOS';
-
#
# ./test.pl does real evilness by jumping to a label.
# This function copies the skip from ./test, omitting the goto.
close $fh or die "Failed to close $progfile: $!\n";
chmod 0755 => $progfile or die "Failed to chmod $progfile: $!\n";
- my $command = "./$progfile";
- $command .= ' 2>&1' unless $^O eq 'MacOS';
+ my $command = "./$progfile 2>&1";
if ( $^O eq 'qnx' ) {
skip "#!./perl not supported in QNX4";
skip "#!./perl not supported in QNX4";
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}
-SKIP_OS: qnx
+SKIP: $* was removed.
####### Funky loop 3.
$_ = q *4a75737420616e6f74686572205065726c204861636b65720a*;
for ($*=******;$**=******;$**=******) {$**=*******s*..*qq}
print chr 0x$& and q
qq}*excess********}
-SKIP_OS: qnx
+SKIP: $* was removed.
####### Funky loop 4.
$_ = q ?4a75737420616e6f74686572205065726c204861636b65720as?;??;
-Mstrict='}); print "Just another Perl Hacker"; ({'
-l
SKIP: No longer works in 5.8.2 and beyond.
-MSWin32
-NetWare
+SKIP_OS: MSWin32
+SKIP_OS: NetWare
####### rand
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
$_ = "\112\165\163\1648\141\156\157\164\150\145\1628\120\145"
. "\162\1548\110\141\143\153\145\162\0128\177" and &japh;
sub japh {print "@_" and return if pop; split /\d/ and &japh}
+SKIP: As of 5.12.0, split() in void context no longer populates @_.
####### magic goto.
sub _ {$_ = shift and y/b-yB-Y/a-yB-Y/ xor !@ _?
exit print :
print and push @_ => shift and goto &{(caller (0)) [3]}}
split // => "KsvQtbuf fbsodpmu\ni flsI " xor & _
+SKIP: As of 5.12.0, split() in void context no longer populates @_.
####### $: fun 1
:$:=~s:$":Just$&another$&:;$:=~s: