summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAgeFilesLines
* Add a deprecation warning for all uses of @*, %*, &* and **.Nicholas Clark2013-03-211-0/+18
| | | | All compile-time uses of the ** typeglob now warn.
* Change the warning for $* to add ", and will become a syntax error".Nicholas Clark2013-03-212-9/+9
| | | | | The intent is that $*, @*, %*, &* and ** stop being parsed as punctuation variables, freeing up the syntax for other use (possibly "splats").
* Generate the deprecation warnings for all uses $* or $#.Nicholas Clark2013-03-211-12/+22
| | | | | | | | | | Previously it would fail to be generated if another variable using the same typeglob was seen first (e.g. @* before $*), and would not be generated for the second and subsequent uses. It's hard to fix the failure to generate warnings at all without also generating them every time, and warning every time is consistent with the warnings that $[ used to generate.
* Additional tests for the deprecation warnings when using $* or $#.Nicholas Clark2013-03-211-0/+40
|
* Change tie_fetch_count.t to use *] instead of **.Nicholas Clark2013-03-211-1/+1
| | | | The test is not sensitive to which typeglob is used.
* Test that UTF-8 in the look-ahead of (?(?=...)...) restarts the sizing parse.Nicholas Clark2013-03-191-0/+4
| | | | | | | | S_reg() recurses to itself to parse various constructions used as the conditionals in conditional matching. Look-aheads and look-behinds can turn out to need to be sized as UTF-8, which can cause the inner S_reg() to use the macro REQUIRE_UTF8 is used to restart the parse. Test that this is handled correctly.
* Test that S_grok_bslash_N() copes if S_reg() restarts the sizing parse.Nicholas Clark2013-03-191-0/+8
| | | | | | | | | | | | S_reg() can discover midway through parsing the pattern to determine its size, that the pattern will actually need to be encoded as UTF-8. If calculations so far have been done in terms of bytes, then the macro REQUIRE_UTF8 is used to restart the parse, so that sizes can be calculated correctly for UTF-8. It is possible to trigger this restart when processing multi-character charnames interpolated into the pattern using \N{}. Test that this is handled correctly.
* detect each() after insert and produce warnings when we doYves Orton2013-03-191-1/+20
| | | | | | | | | | | | | | | Inserting into a hash that is being traversed with each() has always produced undefined behavior. With hash traversal randomization this is more pronounced, and at the same time relatively easy to spot. At the cost of an extra U32 in the xpvhv_aux structure we can detect that the xhv_rand has changed and then produce a warning if it has. It was suggested on IRC that this should produce a fatal error, but I couldn't see a clean way to manage that with "strict", it was much easier to create a "severe" (internal) warning, which is enabled by default but suppressible with C<no warnings "internal";> if people /really/ wanted.
* Harden hashes against hash seed discovery by randomizing hash iterationYves Orton2013-03-191-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds: S_ptr_hash() - A new static function in hv.c which can be used to hash a pointer or integer. PL_hash_rand_bits - A new interpreter variable used as a cheap provider of "semi-random" state for use by the hash infrastructure. xpvhv_aux.xhv_rand - Used as a mask which is xored against the xpvhv_aux.riter during iteration to randomize the order the actual buckets are visited. PL_hash_rand_bits is initialized as interpreter start from the random hash seed, and then modified by "mixing in" the result of ptr_hash() on the bucket array pointer in the hv (HvARRAY(hv)) every time hv_auxinit() allocates a new iterator structure. The net result is that every hash has its own iteration order, which should make it much more difficult to determine what the current hash seed is. This required some test to be restructured, as they tested for something that was not necessarily true, we never guaranteed that two hashes with the same keys would produce the same key order, we merely promised that using keys(), values(), or each() on the same hash, without any insertions in between, would produce the same order of visiting the key/values.
* dist/bignum/lib/bignum.pm: Fix broken pod linkKarl Williamson2013-03-181-1/+0
|
* ext/Pod-Html/testdir/perlvar-copy.pod: Fix broken pod linksKarl Williamson2013-03-181-1/+0
|
* dist/bignum/lib/bigrat.pm: Fix broken pod linkKarl Williamson2013-03-181-1/+0
|
* dist/bignum/lib/bigint.pm: Fix broken pod linkKarl Williamson2013-03-181-1/+0
|
* Math/BigRat.pm: Fix some broken pod linksKarl Williamson2013-03-181-2/+1
| | | | | This also changes the link to blog() to an internal one; it remains broken, but should be documented in this pod, not outside it
* libnetcfg.PL: Fix broken pod linkKarl Williamson2013-03-181-1/+0
|
* Math-BigInt: Fix some broken linksKarl Williamson2013-03-181-3/+0
|
* Tie/File.pm: Fix pod broken link typoKarl Williamson2013-03-181-1/+0
|
* podcheck.t: Note existence of some CPAN modulesKarl Williamson2013-03-181-6/+11
|
* constant.pm: Rmv ref in pod to non-existent moduleKarl Williamson2013-03-181-1/+1
|
* pod/perldiag: Document some regex messagesKarl Williamson2013-03-181-8/+0
|
* pod/perldiag: Document new messages for qr/(?[ ])/Karl Williamson2013-03-181-17/+0
|
* perldiag.pod: Fix broken linkKarl Williamson2013-03-181-1/+0
|
* fix a segfault in run-time qr//s with (?{})David Mitchell2013-03-181-1/+18
| | | | | | While assembling the regex, it was was examining CONSTs in the optree using the wrong pad. When consts are moved into the pad on threaded builds, segvs might be the result.
* toke.c, S_scan_ident: Ignore whitespace on both sides of ${ ... }Brian Fraser2013-03-151-1/+27
| | | | | | | | | | | | | | | | ${ var } (and ${ \7LOBAL_PHASE}) were broken by 32833930e. However, it turns out that the behavior prior to that commit was already strange: ${ .}; # Legal ${. }; # Illegal ${ . }; # Illegal ${ \7LOBAL_PHASE}; # Legal ${ ^GLOBAL_PHASE}; # Illegal ${^GLOBAL_PHASE }; # Illegal This commit restores ${ var } and makes all of the above work by always ignoring spaces on both sides of ${ ... }.
* Removed needless comment in for.tCharlie Gonzalez2013-03-131-1/+0
|
* Moved t/cmd/lexsub.t, t/cmd/while.t to t/op; split t/cmd/for.t to two ↵James E Keenan2013-03-134-588/+567
| | | | | | | | pieces, one in t/op/for.t. Update and sort MANIFEST. From work done at NY Perl Hackathon by Charlie Gonzalez and Taqqai Karim. For: RT #116615
* [perl #117095] state var init getting skippedDavid Mitchell2013-03-121-1/+12
| | | | | Add test case for this bug, which was actually fixed 6 months ago with ad9e6ae10fb581c6c053b862286f8e187063c3ab.
* PATCH: [perl #117101] toke.c: Make \$$1 work again.Brian Fraser2013-03-091-2/+35
| | | | | | | | | | | Commit 3283393 replaced the use of isWORDCHAR (\p{Word}) in scan_ident with isIDFIRST (\p{XIDS}). Generally this was not troublesome, since there are other places that deal with variables matching \d, but one use of isWORDCHAR had given digit variables an unintended special case: $$1 meant ${$1}, whereas $$@ or $$* were syntax errors. This commit restores the special case for \p{POSIX_Digit} variables.
* Skip io/eintr.t on QNX Neutrino tooChris 'BinGOs' Williams2013-03-071-1/+1
|
* t/lib/common.pl should use absolute paths in @INCNicholas Clark2013-03-071-1/+1
| | | | | | | | | | | | | | | | | t/lib/common.pl needs to run test files within a subdirectory, and hence needs change directory into it. Changing a directory poses a problem when running the tests, because @INC is typically '../lib'. The fix for this had been to prepend '../../lib' to @INC, which is the correct relative path while in the subdirectory. However, the END block changes directory upwards (so that it can delete the temporary directory), and in the process of deletion may end up lazy-loading more modules. This will end up searching in ../lib first (ie outside the build directory), which is wrong, and will cause problems if a directory lib/ exists up one level with files of the expected names (eg a lib/ directory from a different version of Perl). Problem identified and diagnosed by Daniel Dragan in RT #116971.
* Restrict the valid identifier syntax, fix some identifier bugs.Brian Fraser2013-03-062-11/+119
| | | | | | | | | | | | Fixes: * Length-one identifiers are now restricted to [\p{XIDS}\p{POSIX_Punct}\p{POSIX_Digit}\p{POSIX_Cntrl}] plus, if under 'no utf8', the 128 non-ASCII characters in the Latin1 range. * Identifiers that start with ASCII letters can be followed with XIDC characters (The committer made some small edits in the pod)
* Fix several differences in the parsing of $.. and ${...}Brian Fraser2013-03-062-5/+61
| | | | | | | | | | | | | | Namely: * The first character in ${...} used to have no restrictions * ${foo:bar} used to be legal * ${foo::bar} worked, but ${foo'bar} didn't And possibly other subtle, so far undiscovered bugs. This was resolved by simply using the same code for both things. Note that this commit is not entirely useful on its own; While tests pass, it requires changes from the following commit to work entirely.
* Set PL_stderrgv to NULL if it is freed.Nicholas Clark2013-03-061-1/+8
| | | | | Without this, it's possible to hit assertion failures when global destruction attempts to skip the PVIO for PL_stderrgv while cleaning up all objects.
* Added descriptions to tests lacking themJasmine Ahuja2013-03-041-29/+29
| | | | For: RT #117011
* Added descriptions to tests lacking them.Andrew Tam2013-03-031-7/+7
|
* Stop SEGV on 'our sub { syntax error }'Peter Martini2013-03-031-1/+14
| | | | | | | | | | | | Fix for RT #116981. If a sub is declared with our, the name is added to the stash early, and left with a NULL ptr if there's a syntax error while compiling it. Since the only time it becomes an issue is when that same name is used in the same scope after a syntax error, what happens in the pad is not particularly important. The simple fix is to simply fall back to treating it like a bareword, and pretending it was never added to the pad in the first place.
* Disable by default the new Copy-on-Write for 5.18David Mitchell2013-03-021-0/+1
| | | | | | | | It was felt that the new COW feature wasn't ready to be enabled be default in 5.18: principally because too much XS code will assume it can just manipulate the PVX buffer of an SVf_POK SV. See RT #116569 for the discussion.
* perlintro: Typo and stop verbatim wrappingKarl Williamson2013-02-241-1/+0
|
* Handle undef values in magic.t on VMS.Craig A. Berry2013-02-231-1/+6
| | | | | | | | | | | | 888a67f6b95603701 added a new test that failed on VMS because it expected the value of an undefined element in %ENV to be an empty string, whereas on VMS it's actually a one-byte string containing a null. This is made possible by the fact that the logical name API uses strings of known lengths, and made necessary by the fact that a zero-length value (equivalence name in VMS parlance) is not allowed. So patch up the test implementation to handle this special case.
* Also skip io/eintr.t on MidnightBSDChris 'BinGOs' Williams2013-02-201-1/+1
|
* suppress "experimental" warnings for my $_Ricardo Signes2013-02-2011-21/+21
|
* put an experimental warning on lexical topicRicardo Signes2013-02-202-1/+16
|
* Un-deprecate the support for lexical $_Rafael Garcia-Suarez2013-02-202-16/+1
|
* Silence irrelevant stderr output from op/magic.tSteve Hay2013-02-201-1/+1
| | | | | | Some 'set' commands in this test are intended to verify that an environment variable is not set, which causes the command to send a warning message to stderr.
* Fix failing op/magic.t test 157Steve Hay2013-02-201-1/+1
| | | | | | | Change 888a67f6b9 added manipulation of __NoNeSuCh2, but it gets accidentally picked up by the 'set' command looking for __NoNeSuCh in test 157 because 'set' will display the value of *all* variables whose prefix matches the name given to the command.
* re/charset.t, re/fold_grind.t: Note C locale can match 128-255Karl Williamson2013-02-192-8/+12
| | | | | | | Craig Berry pointed out that an implementation can have the C locale give meanings to the above-ASCII code points. (I had thought this was an error.) Change label name and comments in these .t files correspondingly.
* re/charset.t: Make sure locale is loaded at compile timeKarl Williamson2013-02-191-2/+5
| | | | | | | | | | | | | Commit 569f7fc5d4ec06501b46a72075ff434fe1bf4332 caused this test file to start failing on VMS. The reason is that the test for locale became run-time. This patch restores the test to compile time, by using the 'if' module. The reason 'if' wasn't used in the original patch was to reduce reliance on possibly untested modules, but it makes things easier. We hope to get a resolution on p5p on which test groups in the suite can use things like 'if', but since 5.17.9 is due out momentarily, I'm using 'if' for now so that VMS will pass its tests again.
* Silence encoding.pm deprecation warnings in the core test suiteRafael Garcia-Suarez2013-02-199-0/+9
|
* Some tests for [perl #112244]Karl Williamson2013-02-181-1/+13
| | | | | | Leon Timmermans is short of tuits right now, so I added these tests for his patch. Since I don't really know what I'm doing here, other tests should eventually be added by someone who does know.
* Update Encode to CPAN version 2.48Chris 'BinGOs' Williams2013-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [DELTA] $Revision: 2.48 $ $Date: 2013/02/18 02:23:56 $ ! encoding.pm t/Mod_EUCJP.pm t/enc_data.t t/enc_eucjp.t t/enc_module.t t/enc_utf8.t t/encoding.t t/jperl.t [PATCH] Deprecate encoding.pm https://rt.cpan.org/Ticket/Display.html?id=81255 ! Encode/Supported.pod Fixed: Pod errors https://rt.cpan.org/Ticket/Display.html?id=81426 ! Encode.pm t/Encode.t [PATCH] Fix for shared hash key scalars https://rt.cpan.org/Ticket/Display.html?id=80608 ! Encode.pm Fixed: Uninitialized value warning from Encode->encodings() https://rt.cpan.org/Ticket/Display.html?id=80181 ! Makefile.PL Install to 'site' instead of 'perl' when perl version is 5.11+ https://rt.cpan.org/Ticket/Display.html?id=78917 ! Encode/Makefile_PL.e2x find enc2xs.bat if it works on windows. https://github.com/dankogai/p5-encode/pull/7 ! t/piconv.t Fix finding piconv in t/piconv.t https://github.com/dankogai/p5-encode/pull/6