summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-07-11 17:57:48 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-07-11 17:57:48 +0000
commit60ed1d8c6a1833ad712cafbcb926be21a03df470 (patch)
tree34088dc4a27bacd6ada9486934679bd7446614c4 /t
parenta9419b5523cf55175503760dcfdf0b3775a2952c (diff)
downloadperl-60ed1d8c6a1833ad712cafbcb926be21a03df470.tar.gz
integrate cfgperl changes#6224..6229 into mainline
p4raw-link: @6229 on //depot/cfgperl: 94f13a8fe911b4e5d658c1e8bb515599305c074c p4raw-link: @6224 on //depot/cfgperl: 9e7db0fd3029ee5d3ce957e842a66c057eacd303 p4raw-id: //depot/perl@6352 p4raw-deleted: from //depot/cfgperl@6351 'delete in' lib/lib.pm (@5608..) p4raw-integrated: from //depot/cfgperl@6351 'copy in' t/lib/english.t (@5586..) ext/Socket/Socket.pm (@5704..) README.hpux (@5972..) lib/English.pm (@6034..) p4raw-integrated: from //depot/cfgperl@6228 'copy in' op.c (@6226..) p4raw-branched: from //depot/cfgperl@6227 'branch in' lib/lib.pm.PL p4raw-integrated: from //depot/cfgperl@6227 'copy in' Makefile.SH (@6182..) MANIFEST (@6192..) p4raw-integrated: from //depot/cfgperl@6225 'merge in' embed.pl (@6221..)
Diffstat (limited to 't')
-rwxr-xr-xt/lib/english.t36
1 files changed, 27 insertions, 9 deletions
diff --git a/t/lib/english.t b/t/lib/english.t
index dba68dbf94..bcc41e1135 100755
--- a/t/lib/english.t
+++ b/t/lib/english.t
@@ -1,9 +1,9 @@
#!./perl
-print "1..16\n";
+print "1..22\n";
BEGIN { unshift @INC, '../lib' }
-use English;
+use English qw( -no_match_vars ) ;
use Config;
my $threads = $Config{'use5005threads'} || 0;
@@ -17,13 +17,11 @@ sub foo {
}
&foo(1);
-if ($threads) {
- $_ = "ok 4\nok 5\nok 6\n";
-} else {
- $ARG = "ok 4\nok 5\nok 6\n";
-}
-/ok 5\n/;
-print $PREMATCH, $MATCH, $POSTMATCH;
+"abc" =~ /b/;
+
+print ! $PREMATCH ? "" : "not ", "ok 4\n" ;
+print ! $MATCH ? "" : "not ", "ok 5\n" ;
+print ! $POSTMATCH ? "" : "not ", "ok 6\n" ;
$OFS = " ";
$ORS = "\n";
@@ -45,3 +43,23 @@ print $EGID == $) ? "ok 14\n" : "not ok 14\n";
print $PROGRAM_NAME == $0 ? "ok 15\n" : "not ok 15\n";
print $BASETIME == $^T ? "ok 16\n" : "not ok 16\n";
+
+package B ;
+
+use English ;
+
+"abc" =~ /b/;
+
+print $PREMATCH ? "" : "not ", "ok 17\n" ;
+print $MATCH ? "" : "not ", "ok 18\n" ;
+print $POSTMATCH ? "" : "not ", "ok 19\n" ;
+
+package C ;
+
+use English qw( -no_match_vars ) ;
+
+"abc" =~ /b/;
+
+print ! $PREMATCH ? "" : "not ", "ok 20\n" ;
+print ! $MATCH ? "" : "not ", "ok 21\n" ;
+print ! $POSTMATCH ? "" : "not ", "ok 22\n" ;