summaryrefslogtreecommitdiff
path: root/t/comp
Commit message (Collapse)AuthorAgeFilesLines
* [perl #75904] \$ prototype does not make a unary functionFather Chrysostomos2010-08-111-1/+26
| | | | | | | | | | | | | | | | | | This fixes this problem : $ perl -le' sub foo($) { print "foo" }; foo $_, exit' foo $ perl -le' sub foo(\$) { print "foo" }; foo $_, exit' Too many arguments for main::foo at -e line 1, at EOF Execution of -e aborted due to compilation errors. for all those prototypes: * \sigil \[...] ;$ ;* ;\sigil ;\[...]
* Global executable bit cleanupDavid Golden2010-07-241-0/+0
| | | | | | | | | | | | | | | | | | | | When porting/makerel runs, all files copied into the directory for the tarball have the executable bit stripped and then only a specific set of files have the executable bit restored. There are many files in the repo that have the executable bit set in the repo that will be stripped. So that the state of files in the repo is as close as possible to the state of files in the release tarball, the executable bit has been stripped from such files. In one recent case, a file added from a dual-life module needed the executable bit set. Because it had the bit in the repo but was not listed in makerel to get an executable bit, tests using it passed in the repo and failed in the tarball. This commit refactors the list into a new file, Porting/exec-bit.txt and add tests to detect a mismatch between files listed there and actual executable bits in the repo.
* additional tests for package block syntaxZefram2010-05-201-20/+72
| | | | | | Test that __PACKAGE__ propagates into string eval correctly. Test that __LINE__ is correct. Test that goto into and out of package blocks works correctly.
* fix SEGV with eval("package Foo {")Zefram2010-05-201-1/+4
| | | | | | OPs relating to the package name and version were subject to double freeing during error recovery from an incomplete package block. Fixed by using the op_latefree mechanism to shift the op free time.
* support "package Foo { ... }"Zefram2010-05-201-0/+37
| | | | | | Package block syntax limits the scope of the package declaration to the attached block. It's cleaner than requiring the declaration to come inside the block.
* Revert "tweak "0x123.456" deprecation"Jesse Vincent2010-05-051-36/+0
| | | | | | | This reverts commit 1183a10042af0734ee65e252f15bd820b7bbe686. Zefram asked me to revert this as he's going to be doing something more pluggable
* tweak "0x123.456" deprecationZefram2010-05-031-0/+36
| | | | | | | | | | | | Some improvements to the deprecation added in commit 6fb472bab4fadd0ae2ca9624b74596afab4fb8cb: - warning message includes the word "deprecated" - warning is in "syntax" category as well as "deprecated" - more systematic tests - dot detected more efficiently by incorporation into existing switch - small doc rewording - avoid the warning in t/op/taint.t
* Revert "Forbid labels with keyword names"Jan Dubois2010-03-021-3/+3
| | | | | | | | This reverts commit f71d6157c7933c0d3df645f0411d97d7e2b66b2f. Revert "Add new error "Can't use keyword '%s' as a label"" This reverts commit 28ccebc469d90664106fcc1cb73d7321c4b60716.
* Setup @INC at compile time because commit ec34a119 needs to load utf8.pmJan Dubois2010-03-021-1/+3
| | | | | '.' needs to remain in @INC because the test also loads comp/hints.aux at compile time too.
* [perl #73174] swash_init() wasn't saving %^HDavid Mitchell2010-03-021-2/+17
|
* Remove npl addresses from "my" filesRobin Barker2010-02-111-1/+1
|
* Move packagev.t from t/comp to t/op, as it fouls the test bootstrapping policy.Nicholas Clark2010-01-181-169/+0
| | | | | The package VERSION syntax isn't strictly an op, but it needs to use several features that aren't yet tested at the time that tests in t/comp are run.
* Omnibus strict and lax version parsingDavid Golden2010-01-132-33/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Authors: John Peacock, David Golden and Zefram The goal of this mega-patch is to enforce strict rules for version numbers provided to 'package NAME VERSION' while formalizing the prior, lax rules used for version object creation. Parsing for use() is unchanged. version.pm adds two globals, $STRICT and $LAX, containing regular expressions that define the rules. There are two additional functions -- version::is_strict and version::is_lax -- that test an argument against these rules. However, parsing of strings that might contain version numbers is done in core via the Perl_scan_version function, which may be called during compilation or may be called later when version objects are created by Perl_new_version or Perl_upg_version. A new helper function, Perl_prescan_version, has been added to validate a string under either strict or lax rules. This is used in toke.c for 'package NAME VERSION' in strict mode and by Perl_scan_version in lax mode. It matches the behavior of the verison.pm regular expressions, but does not use them directly. A new test file, comp/packagev.t, validates strict and lax behaviors of 'package NAME VERSION' and 'version->new(VERSION)' respectively and verifies their behavior against the $STRICT and $LAX regular expressions, as well. Validating these two implementation should help ensure they each work as intended. Other files and tests have been modified as necessary to support these changes. There is remaining work to be done in a few areas: * documenting all changes in behavior and new functions * determining proper treatment of "," as decimal separators in various locales * updating diagnostics for new error messages * porting changes back to the version.pm distribution on CPAN, including pure-Perl versions
* [perl #71748] Bleadperl f0e67a1 breaks CPAN: Template::Plugin::YAML::Encode 0.02Zefram2010-01-051-1/+13
| | | | | Unsurprisingly, the nature of the bug is that I accidentally changed the logic of one of the several types of space skipping. Fix attached.
* Following fd909433c7437296, check that {sub f} correctly stubs the subroutine.Nicholas Clark2010-01-041-1/+4
|
* Allow "{sub f}" to compileVincent Pit2010-01-031-1/+6
|
* [perl #22977] Bug in format/writeZefram2009-12-151-0/+18
|
* Fix for [perl #70910] wrong line number in syntax error messageZefram2009-12-091-0/+13
|
* -Dmad: double free or corruptionTony Cook2009-12-011-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | > If your perl has -Dmad, the following program crashes: > > $ bleadperl -we '$x="x" x 257; eval "for $x"' > *** glibc detected *** bleadperl: double free or corruption (!prev): 0x0000000001dca670 *** Change 6136c704 changed S_scan_ident from: e = d + destlen - 3; to: register char * const e = d + destlen + 3; where e is used to mark the end of the buffer, this meant that the various buffer end checks allowed the various buffers supplied S_scan_ident to overflow. Attached is a fix, various tests with fencepost checks on different identifier lengths, and the specific case mentioned in the ticket. Tony Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
* Fix -DPERL_NO_UTF16_FILTEREric Brine2009-11-302-10/+17
|
* Allow a closing brace after an "use VERSION"Vincent Pit2009-11-281-1/+13
| | | | This fixes [perl #70884] : use VERSION in BLOCK without semicolon -> syntax error
* perl-5.11.2 breaks NYTProf savesrc option (Lexer API suspected)Zefram2009-11-252-0/+51
| | | | | | | | | | | | | | | | | | Tim Bunce wrote: >The primary issue is the off-by-one error in the array indexing. There's a bit more to it than that. The indexing was off-by-one for *some* places that process a new line, but correct for others, so the saved source as a whole was mangled rather than simply offset. Also, there were some redundant calls to update_debugger_info(), so some lines got saved twice, in some cases off-by-one for one saving and not for the other. The saved source is, therefore, hopelessly broken in 5.11.2. Attached patch fixes the source saving. Includes a new test, which works through all reachable places that source lines get saved. This should close RT #70804. -zefram
* Moved the original test file from the previous patch into t/op/lex.t,Jesse Vincent2009-11-251-15/+0
| | | | Aded details on the bug it fixes to the tests.
* add interpolation test for [perl #70091]Gerard Goossen2009-11-251-0/+15
| | | | | (Updated by Jesse Vincent to put the test in comp rather than a new toplevel test directory)
* Force OP_REQUIRE to scalar context at the end of ck_require and don't let it ↵Gerard Goossen2009-11-211-2/+1
| | | | become void context. Fixes problem with require not always being in scalar context.
* Add a TODO test for "require" always being in scalar context.Gerard Goossen2009-11-211-2/+4
|
* S_utf16_textfilter() was not returning EOF correctly in some situations.Nicholas Clark2009-11-011-1/+4
|
* Tweak the filename regexp in parser.t so that ./TEST -utf16 op/parser.t passes.Nicholas Clark2009-11-011-7/+8
|
* S_utf16_textfilter() needs to avoid splitting UTF-16 surrogate pairs.Nicholas Clark2009-10-221-1/+18
| | | | Easier said than done.
* Test requiring files with non-BMP characters (encoded as surrogate pairs).Nicholas Clark2009-10-221-3/+20
|
* Tests for UTF-16 characters > 256, including those containing the octet 10.Nicholas Clark2009-10-221-11/+24
|
* Re-write S_utf16_textfilter() to correctly handle partial reads of UTF-16.Nicholas Clark2009-10-221-7/+9
| | | | | | | | | | Treat any (and all) octects after the BOM (or all, if there was no BOM) as initial read data for the filter, and call it to convert them to the first line, reading more if necessary. This correctly handles the "problem" that UTF-16LE read as a line, on the assumption that it's ASCII/ISO-8859-*/UTF-8/etc will be truncated after the first octect of the "\n\0" pair that is "\n" encoded as UTF-16LE. This fixes bug #69678. Read from the upstream filter in block mode, rather than line mode.
* Move tests for $[ from comp/hints.t to op/array_base.tNicholas Clark2009-10-162-31/+9
| | | | Tests in t/comp/ are too early to rely on pragmata working.
* Move tests for $[ from comp/parser.t to op/array_base.tNicholas Clark2009-10-161-35/+1
| | | | Tests in t/comp/ are too early to rely on pragmata working.
* do subname() is deprecated, so this test from perl 1 needs updating.Nicholas Clark2009-10-161-4/+4
|
* Implement TODO support locally in t/comp/opsubs.tSteve Hay2009-10-121-5/+30
| | | | Removes the FAILED for test 22 on Win32.
* Fix failed() calls in t/compSteve Hay2009-10-123-12/+12
|
* No longer need to skip t/comp/opsubs.t #22 on VMS.Craig A. Berry2009-10-111-4/+1
| | | | | | | | And it's a good thing since the skip infrastructure was pulled out from under us with 6b077bebea000af2a5477d50d7604bab33ee75c2. The Win32 TODO probably still doesn't work and will need to be implemented locally without the require of test.pl.
* Don't use require in comp/fold.t, as require isn't tested yet.Nicholas Clark2009-10-091-3/+39
| | | | Emit TAP directly.
* Give names to all tests in t/comp/fold.tNicholas Clark2009-10-091-8/+8
|
* Move the require './test.pl' to the end of t/comp/hints.tNicholas Clark2009-10-091-32/+32
| | | | | | | | | | | | | Ideally tests in t/comp wouldn't use require, as require isn't tested yet, but this test really needs runperl(), and really wants to live in t/comp/hints.t, so place it at the end, so that any catestrophic failure only fails the last test. We don't use any other functionality of t/test.pl This test uses hard-coded test numbers, but I'm not convinced that it would be correct to re-write it to use an automatically incrementing counter, as that wouldn't fail in an obvious fashion if some compile-time blocks ran out of order. What we have *will* fail in an informative fashion if compile time blocks do not run correctly.
* Don't use require in comp/multiline.t, as require isn't tested yet.Nicholas Clark2009-10-091-6/+43
| | | | Emit TAP directly.
* Don't use require in comp/opsubs.t, as require isn't tested yet.Nicholas Clark2009-10-091-2/+61
| | | | Emit TAP directly.
* Don't use require in comp/our.t, as require isn't tested yet.Nicholas Clark2009-10-091-6/+21
| | | | Emit TAP directly.
* Don't use require in comp/parser.t, as require isn't tested yet.Nicholas Clark2009-10-091-10/+53
| | | | Emit TAP directly.
* Don't use require in comp/retainedlines.t, as require isn't tested yet.Nicholas Clark2009-10-091-4/+36
| | | | Emit TAP directly.
* Avoid relying on prototypes working for tests to pass. They aren't tested yet.Nicholas Clark2009-10-091-8/+7
|
* Don't use require in comp/uproto.t, as require isn't tested yet.Nicholas Clark2009-10-091-5/+45
| | | | Emit TAP directly.
* In opt(), use is(..., undef) rather than ok(!defined ...)Nicholas Clark2009-10-091-1/+5
|
* Move the test for require 5.11.0 not loading strictures to require.t from use.tNicholas Clark2009-10-092-5/+8
|