C++: Solaris CC now compiles "perl"
[p5sagit/p5-mst-13.2.git] / t / comp / require.t
index d0ad1f8..d06834a 100755 (executable)
@@ -11,7 +11,7 @@ $i = 1;
 
 my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0;
 my $Is_UTF8   = (${^OPEN} || "") =~ /:utf8/;
-my $total_tests = 45;
+my $total_tests = 46;
 if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; }
 print "1..$total_tests\n";
 
@@ -183,15 +183,26 @@ $foo = eval  {require bleah}; delete $INC{"bleah.pm"}; ++$::i;
 my $r = "threads";
 eval { require $r };
 $i++;
-if($@ =~ /Directory .*threads not allowed in require/) {
+if($@ =~ /Can't locate threads in \@INC/) {
     print "ok $i\n";
 } else {
     print "not ok $i\n";
 }
 
-############################
-#### Add new tests here ####
-############################
+
+write_file('bleah.pm', qq(die "This is an expected error";\n));
+delete $INC{"bleah.pm"}; ++$::i;
+eval { CORE::require bleah; };
+if ($@ =~ /^This is an expected error/) {
+    print "ok $i\n";
+} else {
+    print "not ok $i\n";
+}
+
+##########################################
+# What follows are UTF-8 specific tests. #
+# Add generic tests before this point.   #
+##########################################
 
 # UTF-encoded things - skipped on EBCDIC machines and on UTF-8 input