diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-02-12 18:06:30 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-02-12 18:06:30 +0000 |
commit | b19a7dcaa3446da7ec098321ab4f016315ed9ae6 (patch) | |
tree | febc3f815704ffaf327b66ee432afdda3d03a4f1 /t/op | |
parent | 6132ea6cb008000f686569237d7bd960bbd9703f (diff) | |
parent | f3dc24a506bc9f8ad2439e198f72ce34fb1c42b0 (diff) | |
download | perl-b19a7dcaa3446da7ec098321ab4f016315ed9ae6.tar.gz |
[win32] integrate mainline
p4raw-id: //depot/win32/perl@513
Diffstat (limited to 't/op')
-rwxr-xr-x | t/op/misc.t | 1 | ||||
-rwxr-xr-x | t/op/pat.t | 27 | ||||
-rw-r--r-- | t/op/re_tests | 12 |
3 files changed, 36 insertions, 4 deletions
diff --git a/t/op/misc.t b/t/op/misc.t index 7a7fc334d3..1ca45db039 100755 --- a/t/op/misc.t +++ b/t/op/misc.t @@ -357,3 +357,4 @@ begin <a> init <b> end <c> argv <> +######## diff --git a/t/op/pat.t b/t/op/pat.t index 5d8bf8ad78..5ea9bb44ae 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -2,7 +2,7 @@ # $RCSfile: pat.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:12 $ -print "1..101\n"; +print "1..104\n"; $x = "abc\ndef\n"; @@ -354,3 +354,28 @@ $x =~ /.a/g; print "not " unless f(pos($x)) == 4; print "ok $test\n"; $test++; + +sub must_warn_pat { + my $warn_pat = shift; + return sub { print "not " unless $_[0] =~ /$warn_pat/ } +} + +sub must_warn { + my ($warn_pat, $code) = @_; + local $^W; local %SIG; + eval 'BEGIN { $^W = 1; $SIG{__WARN__} = $warn_pat };' . $code; + print "ok $test\n"; + $test++; +} + + +sub make_must_warn { + my $warn_pat = shift; + return sub { must_warn(must_warn_pat($warn_pat)) } +} + +my $for_future = make_must_warn('reserved for future extensions'); + +&$for_future('q(a:[b]:) =~ /[x[:foo:]]/'); +&$for_future('q(a=[b]=) =~ /[x[=foo=]]/'); +&$for_future('q(a.[b].) =~ /[x[.foo.]]/'); diff --git a/t/op/re_tests b/t/op/re_tests index b688a167f2..9217fcca1f 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -322,9 +322,9 @@ a(?:b|(c|e){1,2}?|d)+?(.) ace y $1$2 ce ^(a\1?){4}$ aaaaaaaaaa y $1 aaaa ^(a\1?){4}$ aaaaaaaaa n - - ^(a\1?){4}$ aaaaaaaaaaa n - - -^(a\1){4}$ aaaaaaaaaa y $1 aaaa -^(a\1){4}$ aaaaaaaaa n - - -^(a\1){4}$ aaaaaaaaaaa n - - +^(a(?(1)\1)){4}$ aaaaaaaaaa y $1 aaaa +^(a(?(1)\1)){4}$ aaaaaaaaa n - - +^(a(?(1)\1)){4}$ aaaaaaaaaaa n - - (?:(f)(o)(o)|(b)(a)(r))* foobar y $1:$2:$3:$4:$5:$6 f:o:o:b:a:r (?<=a)b ab y $& b (?<=a)b cb n - - @@ -431,6 +431,12 @@ $(?<=^(a)) a y $1 a (?{$a=2})(a(?{local$a=$a+1}))*aak*c(?{$b=$a}) yaaxxaaaacd y $b 4 (>a+)ab aaab n - - (?>a+)b aaab y - - +([[:]+) a:[b]: y $1 :[ +([[=]+) a=[b]= y $1 =[ +([[.]+) a.[b]. y $1 .[ +[a[:xyz: - c - /[a[:xyz:/: unmatched [] in regexp +[a[:xyz:] - c - /[a[:xyz:]/: unmatched [] in regexp +([a[:xyz:]b]+) pbaq y $1 ba ((?>a+)b) aaab y $1 aaab (?>(a+))b aaab y $1 aaa ((?>[^()]+)|\([^()]*\))+ ((abc(ade)ufh()()x y $& abc(ade)ufh()()x |