summaryrefslogtreecommitdiff
path: root/t/op/repeat.t
Commit message (Collapse)AuthorAgeFilesLines
* assertion failure in ... or ((0) x 0))David Mitchell2016-12-051-1/+10
| | | | | | | [perl #130247] Perl_rpeep(OP *): Assertion `oldop' failed the 'x 0' optimising code in rpeep didn't expect the repeat expression to occur on the op_other side of an op_next chain.
* Use set_up_inc for several unit testsNicolas R2016-08-181-2/+2
| | | | | | | | | | | | | | | Use set_up_inc when require.pl is loaded move plan outside of BEGIN block when no tests are run at BEGIN time. Using set_up_inc allow to run these tests under minitest but also compile them using B::C. This also has the advantage to use a single control point for @INC setup. Note: some tests cannot use 'require test.pl', unshfit is then used for them.
* Tired of looking up old bug numbersFather Chrysostomos2016-07-291-2/+2
| | | | | Some of this is ugly, but that’s because I wrote a one-liner to do it. It’s good enough for practical purposes.
* RT: #126309 die more gracefully on (1) x ~1David Mitchell2015-10-281-1/+11
| | | | | | | | | | | | | | | | Recent improvements to MEXTEND() etc means that the above is now caught and panics rather than crashing. However, the panic is: panic: av_extend_guts() negative count (-9223372036854775681) which is safe, but not pretty. This commit makes it croak instead with: Out of memory during stack extend Basically Perl_stack_grow() adds an extra 128 bytes of headroom to the amount it actually extends the stack by. Check in stack_grow() itself whether this has wrapped, rather than leaving it to av_extend_guts(), which can only give a generic panic message.
* [perl #123554] catch a couple of other size overflowsTony Cook2015-02-101-4/+1
| | | | | | Unfortunately, running out of memory in safesysmalloc() and safesysrealloc() doesn't produce a catchable croak(), so remove the test.
* [perl #123554] stop checking the messageTony Cook2015-01-201-2/+1
| | | | | | | Sith IV/UV larger than Size_t, the overflow can be detected earlier, so the message varies. The error is still reported with a croak(), so it can be captured.
* [perl #123554] avoid a crash from SvGROW(MEM_SIZE_MAX)Tony Cook2015-01-191-1/+5
|
* repeat.t: Correct commentFather Chrysostomos2014-11-121-2/+2
| | | | | | When a57276195 changed the eq to is(), the comment was not updated. The test still works. (I tried introducing the bug it was testing for via SP--, and it failed as expected.)
* [perl #121827] Fix repeat stack bugsFather Chrysostomos2014-11-061-1/+11
| | | | | | | | | | | | | | | (...)x... is marked as a list at compile time and given a pushmark, before the context is known. If it turns out to be called in scalar or void context after all, then pp_repeat has to handle the mark that has been pushed on to the markstack. It was not handling the mark for overloading. Nor was it handling void context correctly at all. (The stack may have an empty list, in which case we call FETCH on a potentially tied stack item that has nothing to do with us.) I tested it in void context, because I plan to undo the listification when scalar context is applied, for speed.
* Propagate lvalue context to lhs of (...)x...Father Chrysostomos2014-11-041-1/+7
| | | | This allows foreach(($#array)x$count) { $_++ } to work as expected.
* Allow list assignment to list repetitionFather Chrysostomos2014-10-251-1/+8
| | | | | | | | | | | | | | | (undef,undef,undef,$foo,$bar)=that_function(); can now be written as ((undef)x3, $foo, $bar) = that_function(); Furthermore, (($a)x$assign_to_a,$b) = @c will include $a in the list of variables ta assign to if $assign_to_a is 1, assign $c[0] to $b if $assign_to_a is 0. In other words, assuming $assign_to_a is 1 or 0, it is equivalent to: ($assign_to_a ? ($a, $b) : $b) = @c
* repeat.t: Remove to-do test for 20010809.028Father Chrysostomos2014-10-221-12/+1
| | | | | | | | | Aka #7505, the bug was that list repeat didn’t copy its elements. But list repeat hasn’t copied its elements for years now, and code could be relying on the current behaviour of foreach(($var)x2) { ... } which aliases $_ to $var twice. We also have tests for the current behaviour.
* [perl #78194] Make x copy PADTMPs in lv cxFather Chrysostomos2013-07-251-1/+0
| | | | | So that \(("$a")x2) will give two references to the same scalar, the way that \(($a)x2) does.
* To-do tests for perl #78194Father Chrysostomos2013-07-251-1/+9
| | | | | plus a regular (not to-do) test for an lvalue sub case that already works properly.
* Mark all .t and .pm files as non executableRafael Garcia-Suarez2009-06-061-0/+0
|
* The tokenizer should expect an operator after qw().Rafael Garcia-Suarez2005-05-241-1/+4
| | | | | This fixes [perl #35885] qw and x operators doesn't mix p4raw-id: //depot/perl@24560
* Remove the "malloc wrappage" tests, due to their unportabilityRafael Garcia-Suarez2004-06-091-38/+1
| | | | | (as suggested by Jarkko.) p4raw-id: //depot/perl@22922
* Re: [PATCH] Re: Lack of error for large string on SolarisJarkko Hietaniemi2004-06-081-1/+45
| | | | | Message-ID: <40C4A156.5030205@iki.fi> p4raw-id: //depot/perl@22904
* Finally, this "Negative repeat count" warning wasn't such a greatAndy Lester2004-03-211-1/+12
| | | | | | | | idea. Disable it. But add tests for this : Subject: Re: [perl #27811] (@x) x -1 is a panic Message-ID: <20040321152704.GA9041@petdance.com> p4raw-id: //depot/perl@22549
* Retract 11635: close 20011113.110, reopen 20010809.028.Jarkko Hietaniemi2001-11-181-4/+15
| | | | | | Tiny problem in the test for 20011113.110: I hope 'my $x= [("foo") x 1]' was never going to produce [qw(foo foo)] :-) p4raw-id: //depot/perl@13077
* Re: Test [ID 25] [PATCH t/op/repeat.t] Cleanup and bug testMichael G. Schwern2001-11-141-27/+40
| | | | | Message-ID: <20011114163825.D6519@blackrider> p4raw-id: //depot/perl@12999
* Re: B::Deparse bug (5.6.0)Robin Houston2001-03-241-1/+14
| | | | | Message-ID: <20010324143309.B17734@puffinry.freeserve.co.uk> p4raw-id: //depot/perl@9325
* Add information about the two DEC C compiler optimizer bugsJarkko Hietaniemi1999-04-131-6/+11
| | | | | (what patch levels of the compilers fix them). p4raw-id: //depot/cfgperl@3258
* Slight recoding of util.c:repeatcpy() to circumnavigateJarkko Hietaniemi1998-12-221-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | a Digital C compiler optimizer bug that broke the 'x' operator under certain circumstances. See t/op/repeat.t test #20 for graphic details. Reported in From: Gisle Aas <gisle@aas.no> To: Mark Martinec <Mark.Martinec@nsc.ijs.si> Cc: ach@xray.mpe.mpg.de, cpan-testers@perl.org, perl5-porters@perl.org Subject: Re: Digest-MD5-2.00 test fails on DEC Alpha - a patch Date: 18 Dec 1998 14:27:40 +0100 Message-ID: <m37lvpa8c3.fsf@furu.g.aas.no> and discussed further in the thread From: Jarkko Hietaniemi <jhi@iki.fi> To: Gisle Aas <gisle@aas.no> Cc: Mark Martinec <Mark.Martinec@nsc.ijs.si>, ach@xray.mpe.mpg.de, cpan-testers@perl.org, perl5-porters@perl.org Subject: x operator broken in DEC Alpha for 8-bit characters (Re: Digest-MD5-2.00 test fails on DEC Alpha - a patch) Date: Fri, 18 Dec 1998 16:18:37 +0200 (EET) Message-ID: <13946.25661.193449.138023@alpha.hut.fi> p4raw-id: //depot/cfgperl@2498
* perl 5.0 alpha 2perl-5a2Larry Wall1993-10-071-1/+1
| | | | [editor's note: from history.perl.org. The sparc executables originally included in the distribution are not in this commit.]
* perl 4.0.00: (no release announcement available)perl-4.0.00Larry Wall1991-03-211-0/+42
So far, 4.0 is still a beta test version. For the last production version, look in pub/perl.3.0/kits@44.