use $module;
print exists \$INC {'$exclude.pm'} ? "not ok" : "ok";
--
- fresh_perl_is ($prog, "ok", "", "$module does not load $exclude");
+ fresh_perl_is ($prog, "ok", {}, "$module does not load $exclude");
}
}
}
for my $arg ('', 'q[]', qw( 1 undef )) {
- fresh_perl_is(<<"----", <<'====', "Internals::* functions check their argument under func() AND &func() [perl #77776]");
+ fresh_perl_is(<<"----", <<'====', {}, "Internals::* functions check their argument under func() AND &func() [perl #77776]");
sub tryit { eval shift or warn \$@ }
tryit "&Internals::SvREADONLY($arg)";
tryit "&Internals::SvREFCNT($arg)";
is( $@, '', @_);
}
-fresh_perl_is 'use attributes; print "ok"', 'ok',
+fresh_perl_is 'use attributes; print "ok"', 'ok', {},
'attributes.pm can load without warnings.pm already loaded';
our $anon1; eval_ok '$anon1 = sub : method { $_[0]++ }';
'print with only a filehandle outputs $_');
SKIP: {
skip_if_miniperl('no dynamic loading of PerlIO::scalar in miniperl');
-fresh_perl_is(<<'EOF', "\xC1\xAF\xC1\xAF\xC1\xB0\xC1\xB3", "", "print doesn't launder utf8 overlongs");
+fresh_perl_is(<<'EOF', "\xC1\xAF\xC1\xAF\xC1\xB0\xC1\xB3", {}, "print doesn't launder utf8 overlongs");
use strict;
use warnings;
fresh_perl_is(
'package A::B; sub a { // }; %A::=""',
'',
- '',
+ {},
);
# Variant of the above which creates an object that persists until global
# destruction, and triggers an assertion failure prior to change
fresh_perl_is(
'use Exporter; package A; sub a { // }; delete $::{$_} for keys %::',
'',
- '',
+ {},
);
}
}
SKIP: { skip 'no attributes.pm', 1 unless eval 'require attributes';
-fresh_perl_is(<<'----', <<'====', "lvalue can not be set after definition. [perl #68758]");
+fresh_perl_is(<<'----', <<'====', {}, "lvalue can not be set after definition. [perl #68758]");
use warnings;
our $x;
sub foo { $x }
"abc" =~ qr/(?<$char>abc)/;
EOP
utf8::encode($prog);
- fresh_perl_like($prog, qr!Group name must start with a non-digit word character!, "",
+ fresh_perl_like($prog, qr!Group name must start with a non-digit word character!, {},
sprintf("'U+%04X not legal IDFirst'", ord($char)));
}
}
use re qw(Debug COMPILE);
$re;
EOP
- fresh_perl_like($prog, qr/synthetic stclass/, "stderr", "$re generates a synthetic start class");
+ fresh_perl_like($prog, qr/synthetic stclass/, { stderr=>1 }, "$re generates a synthetic start class");
}
}
{
fresh_perl_is('print eval "\"\x{101}\" =~ /[[:lower:]]/", "\n"; print eval "\"\x{100}\" =~ /[[:lower:]]/i", "\n";',
"1\n1", # Both re's should match
- "",
+ {},
"get [:lower:] swash in first eval; test under /i in second");
}
# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2013-06/msg01290.html
fresh_perl_like('use warnings; "abc" =~ qr{(?&foo){0}abc(?<foo>)}',
'Quantifier unexpected on zero-length expression',
- "",
+ {},
'No segfault on qr{(?&foo){0}abc(?<foo>)}');
}
unless $Config{extensions} =~ / Encode /;
# Test case cut down by jhi
- fresh_perl_like(<<'EOP', qr!Malformed UTF-8 character \(unexpected end of string\) in substitution \(s///\) at!, 'Segfault using HTML::Entities');
+ fresh_perl_like(<<'EOP', qr!Malformed UTF-8 character \(unexpected end of string\) in substitution \(s///\) at!, {}, 'Segfault using HTML::Entities');
use Encode;
my $t = ord('A') == 193 ? "\xEA" : "\xE9";
Encode::_utf8_on($t);
}
}
-fresh_perl_is( '$_=q(foo);s/(.)\G//g;print' => 'foo',
+fresh_perl_is( '$_=q(foo);s/(.)\G//g;print' => 'foo', {},
'[perl #69056] positive GPOS regex segfault' );
-fresh_perl_is( '$_="abcdef"; s/bc|(.)\G(.)/$1 ? "[$1-$2]" : "XX"/ge; print' => 'aXXdef',
+fresh_perl_is( '$_="abcdef"; s/bc|(.)\G(.)/$1 ? "[$1-$2]" : "XX"/ge; print' => 'aXXdef', {},
'positive GPOS regex substitution failure (#69056, #114884)' );
-fresh_perl_is( '$_="abcdefg123456"; s/(?<=...\G)?(\d)/($1)/; print' => 'abcdefg(1)23456',
+fresh_perl_is( '$_="abcdefg123456"; s/(?<=...\G)?(\d)/($1)/; print' => 'abcdefg(1)23456', {},
'positive GPOS lookbehind regex substitution failure #114884' );
# s/..\G//g should stop after the first iteration, rather than working its
is( $@, '', @_);
}
-fresh_perl_is 'use attributes; print "ok"', 'ok',
+fresh_perl_is 'use attributes; print "ok"', 'ok', {},
'attributes.pm can load without warnings.pm already loaded';
eval 'sub è1 ($) : plùgh ;';