summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* regcomp.c: utf8 pattern implies uni rulesKarl Williamson2011-03-142-1/+9
| | | | | | This fixes a regression introduced with charset regex modifiers. A utf8 pattern without a charset is supposed to mean unicode semantics. But it didn't until this patch.
* Convert t/re/regexp_unicode_prop.t to using test.pl's functions for testing.Nicholas Clark2011-03-141-19/+17
|
* Convert the remainder of t/op/numconvert.t to test.pl, strict and warnings.Nicholas Clark2011-03-141-27/+22
|
* Convert t/re/subst_amp.t to test.pl, strict and warnings.Nicholas Clark2011-03-141-31/+20
| | | | | This reduces the line count by about 25%. Also, remove the unneeded code to load Config, which is never referenced.
* Add a test to ensure that test.pl doesn't mention $&Nicholas Clark2011-03-141-0/+15
| | | | | This will allow it to be used safely for tests that explicitly want to test the behaviour of perl without (and with) $& having been seen by the parser.
* perlop: Mention the s///le special caseFather Chrysostomos2011-03-131-0/+8
| | | | | This is apparently undocumented except in perldiag and a previous perldelta.
* Update CPAN.pm to CPAN version 1.9600David Golden2011-03-1316-12/+215
| | | | | Only blead-visible change from 1.94_65 are version numbers and the addition of the 2011 PAUSE batch signing key.
* perldelta up to d24f2be2Father Chrysostomos2011-03-131-6/+14
|
* Refactor t/op/assignwarn.t to generate all the tested code from data structuresNicholas Clark2011-03-131-68/+44
|
* Convert t/op/anonsub.t to test.pl, strict and warnings.Nicholas Clark2011-03-131-64/+23
| | | | | test.pl no longer uses closures, which removes the principal reason for avoiding it until now. anonsub.t is now 25% shorter.
* In test.pl, avoid using a closure to capture warnings.Nicholas Clark2011-03-131-3/+8
| | | | | | | | | In the general case a closure is the "right" way to do "it". However, closures, unlike local and regular subroutines, have some complexity at compile time, which means that using closures in test.pl runs the risk of closure bugs causing spurious hard to diagnose collateral damage to other tests. local is already in use, and "has" to work for capturing warnings, as $SIG{__WARN__} is localised already.
* Convert t/re/reg_mesg.t to test.pl and strict.Nicholas Clark2011-03-131-87/+32
| | | | | | This reduces its line count by 25%, with no loss of functionality. (It actually tests slightly more, specifically that the regexps in @death don't generate warnings, just die.)
* Move t/re/reg_unsafe.t's test to a fresh_perl_is() inside pat_advanced.tNicholas Clark2011-03-133-20/+16
| | | | | Add a passing variant which mentions $&. Note the bug number (#86042) in the TODO test.
* Convert t/re/reg_email.t to test.pl, strict and warnings.Nicholas Clark2011-03-131-7/+8
|
* In overload.t, move require './test.pl' into BEGIN to avoid stubbing subs.Nicholas Clark2011-03-131-12/+5
| | | | | Also move the use of strict and warnings after the BEGIN block, so that they can take advantage of the @INC setting it performs. Swap to done_testing().
* Convert t/op/magic.t to test.pl, strict and warnings.Nicholas Clark2011-03-131-43/+37
| | | | | | Use ok() rather than the more "obvious" is(), cmp_ok() etc to strictly control the number of accesses made to the passed in value. For example, is() accesses its $got more than once, which defeats the purpose of this test.
* Convert t/op/die_unwind.t to test.pl, strict and warnings.Nicholas Clark2011-03-131-20/+17
|
* Convert t/op/die_except.t to test.pl, strict and warnings.Nicholas Clark2011-03-131-19/+16
|
* Remove the couple of references to AutoLoader that remained inDavid Leadbeater2011-03-131-6/+2
| | | | DynaLoader after 0a0b6c96e6.
* Convert t/op/do.t to test.pl, strict and warnings.Nicholas Clark2011-03-131-84/+88
| | | | Also use tempfile(), rather than names derived from the process ID.
* Convert t/op/pwent.t to test.pl, strict and warnings.Nicholas Clark2011-03-131-109/+113
| | | | | Move most of the logic for "hunt the password data" out of the BEGIN block, as it has no special reason to be in one.
* C<not> should be C<!> in pwent.t, to fix a precedence bug.Nicholas Clark2011-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fortunately the effects are mostly benign. There are two boolean conditions - $where defined, and PerlIO available, making 4 possible combinations. As was, the code was: if (not defined $where && $Config{useperlio} eq 'define') { ... if (-x '/usr/bin/dscl') { ... if (open (PW, '<', \$data)) { $where = ...; would enter the first if block for 3 out of 4 possibilities, skipping only if *both* $where as defined *and* PerlIO was available. This was not the intent. However, if PerlIO is unavailable, then the open will fail, $where won't be set, and the logic continues on below, falling back to /etc/passwd The intended logic is if (!defined $where && $Config{useperlio} eq 'define') { ... ie only enter on 1 of the 4 possibilities - skip unless $where was undefined and PerlIO was available. The net effect was that usually the behaviour was the same. The only difference will be if PerlIO is not available (not the default, and rarely changed), the password data *is* available from one of the services tested earlier, and an /usr/bin/dscl executable is present. In this case, the old code would have reached the open, which would have failed, but would have closed PW as a side effect. However, because $where would be defined, the fallback to /etc/passwd would not have been tried. This would have caused the regression test to fail. Also, the test C<$Config{useperlio} eq 'define'> is not quite correct, as $Config{useperlio} will be undef if PerlIO is disabled, and the eq will warn.
* In pwent.t, sanitise the logic for opening /etc/passwd, and calling skip_all()Nicholas Clark2011-03-131-17/+16
| | | | It is now clearer what the code is doing when, and why.
* Convert t/op/mydef.t to test.pl, strict and warnings.Nicholas Clark2011-03-131-71/+71
|
* In t/op/mydef.t, add missing C<eval> to a test.Nicholas Clark2011-03-131-1/+1
| | | | | | As the test is for 'ne', it passes without the eval. However, the test's description and surrounding code make it clear that it is a test for the results of eval.
* [perl #82111] de-pessimise some my @array = ...David Mitchell2011-03-121-1/+12
| | | | | | | | | | | | | Due to obscure closure and goto tricks, it's sometimes possible for the array or hash in the LHS of 'my @a = ...' and 'my %h = ...' to be non-empty. At compile-time, these conditions are detected and the assign op is compiled with the OPpASSIGN_COMMON, making the assignment slower. This commit speeds it up again by adding a run-time check to pp_aassign to only do the OPpASSIGN_COMMON code-branch if the LHS isn't an empty array or hash. See also #70171.
* Convert t/op/inc.t to test.pl and use strict.Nicholas Clark2011-03-121-90/+61
|
* Fix long-standing bug in t/op/inc.t, whereby ok() ignored a failed match.Nicholas Clark2011-03-121-5/+7
| | | | | | | | | | | | Unlike test.pl and Test::More, the home-rolled ok() in t/op/inc.t didn't have a prototype. Hence its arguments are in *list* context, meaning that any match will return an *empty list* if it fails. Provided ok() was called with a second, true, parameter, the failed match would not be noticed, because ok() would register a test pass, because it would now be testing the (intended) second parameter. Add a prototype, and fix the logic for the tests affected. Fortunately this wasn't concealing any bugs.
* In t/op/inc.t, inline check_some_code() into its only call point.Nicholas Clark2011-03-121-34/+32
|
* In t/op/inc.t, reorder the parameters to check_some_code()Nicholas Clark2011-03-121-7/+5
| | | | | | This allows the two (inner) loops that call it to be merged into one. Swapping the (now merged) inner and outer loops will aid subsequent refactoring.
* perldelta entriesFather Chrysostomos2011-03-121-3/+118
|
* release_managers_guide.pod: Add Module::CoreList to perldeltaFather Chrysostomos2011-03-121-0/+2
| | | | | perl 5.13.6 to 5.13.10 did not include perldelta entries for Module::CoreList.
* perlunicode: double spaceFather Chrysostomos2011-03-121-1/+1
|
* Switch Storable to IO::File from FileHandle, only load if neededDavid Leadbeater2011-03-121-2/+3
| | | | | On blead IO::File would be autoloaded but can't rely on this as Storable is dual life.
* Stop using AutoLoader in StorableDavid Leadbeater2011-03-121-27/+20
| | | | | | Storable isn't that large by today's standards; using AutoLoader doesn't make much sense now. Although barely significant this shaves about 1% off the execution time of the tests on my machine.
* Switch Storable to XSLoader from DynaLoaderDavid Leadbeater2011-03-121-4/+5
|
* regcomp.c: /a should handle /\xdf/i same as /uKarl Williamson2011-03-122-7/+35
| | | | | | | /a and /u should match identically case-insensitively, but they didn't. Nor was /a being tested because it was thought that they handled things identically, and the tests were already taking too long. So this adds some tests as well.
* Convert t/op/study.t to use test.pl, strict and warnings.Nicholas Clark2011-03-121-58/+25
| | | | Replace its alarm_ok() with test.pl's watchdog().
* Convert t/op/utf8cache.t to test.pl, strict and warnings.Nicholas Clark2011-03-121-11/+7
|
* skip_all_without_dynamic_extension() should accepted names containing ::sNicholas Clark2011-03-121-0/+1
| | | | | | | | | | | Whilst the package separator is a double colon, config.sh ends up using a / for the package separator, reflecting how, historically, extensions were laid out in nested directories beneath ext/. The layout has changed, but the convention in the config.sh entries, and hence the %Config::Config values, remains the same. Hence skip_all_without_dynamic_extension() needs to convert passed-in ::s to / before performing a lookup.
* Rename test.pl's skip_all_without_extension to *_dynamic_extension().Nicholas Clark2011-03-1212-23/+13
| | | | | | All callers were using it with dynamic extensions, and also had a skip_all_if_miniperl() for the same extension. Merge the two tests into one function to save repetition.
* Convert t/op/readdir.t to test.pl, strict and warnings.Nicholas Clark2011-03-121-29/+34
|
* Convert t/op/goto_xs.t to test.pl, strict and warnings.Nicholas Clark2011-03-121-36/+27
|
* Move pwent.t's test for NIS+ earlier, before the "fallback" of /etc/passwdNicholas Clark2011-03-121-3/+3
| | | | | | This seems a more logical place for it, on the assumptions that a: only 1 of the 4 programs tried will produce results b: Reading from /etc/passwd is intended as a fallback if none produce results.
* In t/op/pwent.t, create try_prog() for the common 'try this command' logic.Nicholas Clark2011-03-121-35/+20
| | | | | Also refactor the clearing of $reason, without changing the behaviour of when it is cleared (which is slightly less than logical.)
* Add PERL_PRESERVE_IVUV to non_bincompat_options.Nicholas Clark2011-03-121-0/+3
| | | | | | It's actually the default, but as all the C code is conditionally (not) compiled on the basis of that pre-processor macro, seems that it is the one that needs to be reported.
* Fix RT #84294 /((\w+)(?{print $2})){2,2}/ problemYves Orton2011-03-122-3/+5
| | | | | | | | | | | | | | | | When we are doing a CURLYX/WHILEM loop and the min iterations is larger than zero we were not saving the buffer state before each iteration. This mean that partial matches would end up with strange buffer pointers, with the start *after* the end point. In more detail WHILEM has four exits, three of which as far as I could tell would do a regcppush/regcppop in their state transitions, only one, WHILEM_A_pre which is entered when (n < min) would not. And it is this state that we repeatedly enter when performing A the min number of times. When I made the logic similar to the handling of ( n < max ), the bug went away, and as far as I can tell nothing else broke. Review by Dave Mitchell required before release.
* Add tests for RT #84294 /((\w+)(?{print $2})){2,2}/ problemYves Orton2011-03-121-1/+12
| | | | | | | | | | | | | | | | | | | | | | Original ticket reports: print "Match: \$1=$1 \$2=$2" if 'ab' =~/^((\w+)(?{print defined $2 ? "\$2=$2\n" : "\$2 not defined\n"})){2}$/; Produces the following incorrect output: $2=ab $2 not defined $2=b Match: $1=b $2=b It should produce: $2=ab $2=a $2=b Match: $1=b $2=b This adds a TODO test to verify this behavior.
* In utf8decode.t, use //x to add comments to the parsing regexp.Nicholas Clark2011-03-121-3/+9
| | | | Also, assign directly to variables, instead of going via $1 to $7.
* In utf8decode.t, test that we get the expected Unicode character(s)Nicholas Clark2011-03-121-20/+24
| | | | | | Previously some (not all) of the "y"es cases detailed the expected code point. Add all those that were missing, and update the parsing regexp to cope with multiple Unicode characters.