File: defsv.t

package info (click to toggle)
liblexical-sealrequirehints-perl 0.012-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 360 kB
  • sloc: perl: 340; makefile: 3
file content (31 lines) | stat: -rw-r--r-- 681 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use warnings;
use strict;

use Test::More tests => 5;

BEGIN { use_ok "Lexical::SealRequireHints"; }
BEGIN { unshift @INC, "./t/lib"; }

SKIP: {
	skip "CORE::GLOBAL::require breaks require() on this perl", 4
		if defined(&CORE::GLOBAL::require) && "$]" < 5.015005;
	my $retval;
	eval q{ our $_ = "t/context_0.pm"; $retval = require; 1 };
	is $@, "";
	is $retval, "t::context_0 return";
	SKIP: {
		skip "no lexical \$_ on this perl", 2
			if "$]" < 5.009001 || "$]" >= 5.023004;
		eval q{
			no warnings "$]" >= 5.017009 ? "experimental" :
							"deprecated";
			my $_ = "t/context_1.pm";
			$retval = require;
			1;
		};
		is $@, "";
		is $retval, "t::context_1 return";
	}
}

1;