summaryrefslogtreecommitdiff
path: root/t/comp/require.t
diff options
context:
space:
mode:
Diffstat (limited to 't/comp/require.t')
-rwxr-xr-xt/comp/require.t12
1 files changed, 11 insertions, 1 deletions
diff --git a/t/comp/require.t b/t/comp/require.t
index 1d92687355..48e3e0038b 100755
--- a/t/comp/require.t
+++ b/t/comp/require.t
@@ -7,7 +7,7 @@ BEGIN {
# don't make this lexical
$i = 1;
-print "1..20\n";
+print "1..23\n";
sub do_require {
%INC = ();
@@ -124,6 +124,16 @@ sub dofile { do "bleah.do"; };
print $x;
$i++;
+# UTF-encoded things
+my $utf8 = chr(0xFEFF);
+my $utf16 = chr(255).chr(254);
+do_require("${utf8}print \"ok $i\n\"; 1;\n");
+$i++;
+do_require("$utf8\nprint \"ok $i\n\"; 1;\n");
+$i++;
+do_require("$utf16\n1;");
+print "ok $i\n" if $@ =~ /Unsupported script encoding/;
+
END { 1 while unlink 'bleah.pm'; 1 while unlink 'bleah.do'; }
# ***interaction with pod (don't put any thing after here)***