From 3409ec4ce64b7010eb757067ca270d504c3e0146 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20D=C3=A9sarm=C3=A9nien?= Date: Sun, 19 Jul 1998 14:28:33 +0200 Subject: [PATCH] add tests to check if context propagation works Message-ID: <35B1CA51.A606AD27@club-internet.fr> Subject: Re: m//g strange behaviour in 5.004 p4raw-id: //depot/perl@1599 --- MANIFEST | 1 + t/op/context.t | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 t/op/context.t diff --git a/MANIFEST b/MANIFEST index 6c82f65..21c2f94 100644 --- a/MANIFEST +++ b/MANIFEST @@ -882,6 +882,7 @@ t/op/chop.t See if chop works t/op/closure.t See if closures work t/op/cmp.t See if the various string and numeric compare work t/op/cond.t See if conditional expressions work +t/op/context.t See if context propagation works t/op/defins.t See if auto-insert of defined() works t/op/delete.t See if delete works t/op/die.t See if die works diff --git a/t/op/context.t b/t/op/context.t new file mode 100755 index 0000000..4625441 --- /dev/null +++ b/t/op/context.t @@ -0,0 +1,18 @@ +#!./perl + +$n=0; + +print "1..3\n"; + +sub foo { + $a='abcd'; + + $a=~/(.)/g; + + $1 eq 'a' or print 'not '; + print "ok ",++$n,"\n"; +} + +$a=foo; +@a=foo; +foo; -- 2.7.4