| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
We do not have any tests for the bool internals. This creates a bunch of
them to test and validate the various new API calls for creating and
setting bools.
|
| |
|
|
|
|
|
| |
This line has a syntax error in it. Fix it, and split into two lines so
doesn't wrap on output in an 80 column terminal window
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new
for my ($x,$y,...) (...) { ... }
syntax has a couple of problems in the degenerate case of a single
variable:
for my ($x) (...) { ... }
First, the loop variable is marked as lexical, but not as a variable
to be introduced. So it behaves roughly as if written like:
{ my $x; for $x (...) { ... } }
I can't think of any user-visible runtime change in behaviour this bug
causes, so I haven't included a test for it.
Second, it was being incorrectly deparsed as
for $x (...) { ... }
(i.e. without the 'my').
This commit fixes both of these issues.
The basic problem is that the parser, in the case of multiple vars,
passes a list subtree of PADSVs as the 'sv' argument of Perl_newFOROP,
but in the case of a single var, passes a single PADSV op instead.
This single PADSV doesn't have the LVINTRO flag set, so is
indistinguishable from plain
my $x; for $x ....
This commit makes the parser set the OPf_PARENS flag on the lone PADSV
to signal to newFOROP() that it's a degenerate 1-var list, and
newFOROP() sets the OPf_PARENS flag on the ENTERITER op to signal to the
deparser that this is "for my (...)" syntax, even if it only has a
single var.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The debug output leaks a large amount of information about the
implementation details of the regex engine and as such is highly likely
to change based on almost any change to the regex engine. Also from time
to time we make changes to the output to improve legibility, etc. While
the output of C<use re 'debug'> is intended for user consumption as well
as for debugging the regex engine itself I believe that we should not
provide any backcompat guarantees about its specific contents or format.
Similarly the list of options we provide for C<use re 'Debug'> may be
affected by changes in the internals of the engine, rending old
categories irrelevant, or requiring new categories to be added.
This patch adds language to the C<re.pm> docs that stipulate that the
debug options we provide under C<use re 'Debug'> and the output we
provide from C<use re 'debug'> and C<use re 'Debug'> are subject to
change without notice at any major or minor release.
While I do not anticipate changes to the output in a minor release I
believe it is wise to specify that we do not commit ourselves to
consistency in this regard in any way. For instance were the situation
to arise that we had a security issue or serious performance issues or
some other strong justification to make a change in a minor release then
this could very well change the output we provide or the options we
support.
|
|
|
|
|
|
|
|
| |
* ext/GDBM_File/Makefile.PL: Don't protect basic error codes by
ifdefs: they are not macros in recent versions of GDBM. Besides,
they are known to exist in any GDBM version.
For: https://github.com/Perl/perl5/pull/19602
|
| |
|
|
|
|
|
|
|
|
| |
This test fails on EBCDIC systems, because it wants a non-ASCII
character, and the one it chose, E9, is ASCII on EBCDIC ('Z').
perlhacktips suggests B6 as a character to use in such tests, and this
commit changes to use that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The prior commit shows what can happen when two branches do the same
thing: they can get out of sync
Since this test file was originally written, the testing infrastructure
has improved so that there are functions that handle the gory details of
character set differences for you. This test file hadn't been updated
since it wasn't causing a problem, until now.
This commit changes to use the new infrastructure, and as a result one
branch gets removed each from the two tests that varied depending on
character set.
|
|
|
|
|
| |
This file was recently changed, and the EBCDIC side of the change had a
typo.
|
| |
|
| |
|
|
|
|
| |
Perl core itself seems not to call my_strtod, so test it with XS::APItest.
|
|
|
|
|
|
| |
We know how grok results should vary with and without PERL_SCAN_TRAILING
both for inputs with trailing garbage and those without, so abstract
that out and test both cases for each input.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Consistently honour what the docs have always promised:
If an infinity or a not-a-number is recognized, C<*sp> will point to
one byte past the end of the recognized string. If the recognition fails,
zero is returned, and C<*sp> will not move.
Additionally, restore Perl_grok_number_flags to allowing inf/nan with
trailing garbage only when called with PERL_SCAN_TRAILING; add notes
to the other two core callers to clarify that they always accept such
trailing garbage.
A small number of XS-APItest tests were modified to reflect the stricter
behaviour: "Infin" and "nanx" are now invalid without PERL_SCAN_TRAILING.
|
|
|
|
|
|
| |
This improves the readability of SV dumps for those more familiar with
hex than octal--which, in 2022, is probably an outsized majority of
programmers.
|
|
|
|
|
|
| |
Eliminate hard tabs and trailing whitespace from two files.
Increment $VERSION.
|
|
|
|
|
|
|
| |
This macro relied on a now-removed other macro in 2019,
216dc346ceeeb9b6ba0fdd470ccfe4f8b2a286c4. Fix it and add tests.
This bug was caught by Devel::PPPort
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code was added by Mark Jason Dominus to aid a regex debugger
he wrote for ActiveState. The basic premise is that every opcode
in a regex can be attributed back to a contiguous sequence of characters
that make up the pattern. This assumption has not been true ever since
the "jump" TRIE optimizations were added to the engine.
I spoke to MJD many years ago about whether it was ok to remove this
from the regex engine and he said he had no objections.
An example of a pattern that cannot be handled correctly by this logic is
/(?: a x+ | b y+ | c z+ )/x
where the
(?:a ... | b ... | c ...)
parts will now be handled by the TRIE logic and not by the BRANCH/EXACT
opcodes that it would have been in the past. The offset debug output
cannot handle this type of transformation, and produce nonsense output
that mention opcodes that have been optimized away from the final program.
The regex compiler is complicated enough without having to maintain this
logic. There are essentially no tests for it, and the few tests that do
cover it do so as a byproduct of testing other things. Despite the offsets
logic only being used in debug supporting it does have a cost to non-debug
logic as various internal routines include parameters related to it that
are otherwise unused.
Note this output is only usable or visible by enabling special flags
in re.pm, there is no formal API to access it short of parsing the
output of the debug mode of the regex engine, which has changed multiple
time over the past years.
|
|
|
|
| |
Returns the hash value as if computed with a different seed.
|
|
|
|
| |
Equality operators test equality, not equivalence.
|
| |
|
|
|
|
|
| |
A note in the description of "isnan" used to say that NaN-ness
cannot be tested with equality operator, but it should be possible.
|
| |
|
| |
|
| |
|
|
|
|
| |
passed
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The system headers on z/OS are in EBCDIC, but are untagged. The bi-modal build requires that files be tagged correctly
so this patch copies the errno.h file (which may be mounted on a read-only file system) to a local file and then tags
it as IBM-1047 (EBCDIC) so that it can be processed properly. The longer-term fix for this may be to have z/OS tag
header files as EBCDIC, although this would not be something Perl could rely on for several years.
|
|
|
|
|
|
|
| |
"use warnings;" in all tests. Remove emacs identifiers. Change tabs to
spaces in tests.
For: https://github.com/Perl/perl5/pull/19304
|
|
|
|
|
|
|
|
|
| |
- do not count tests:
- use done_testing
- put tests requiring threading in their own subtests so we can
skip_all
- smaller improvements: use strict & warnings everywhere, tabs >>
spaces
|
|
|
|
|
|
|
|
|
| |
Bareword filehandles are bad and this module should really remove
this one.
I'm also bumping the version to a stable one because why not.
For: https://github.com/Perl/perl5/pull/19302
|
|
|
|
|
|
|
|
|
|
| |
This effectively reverts 3ece276e6c0.
It turns out this was a bad idea to make U mean the non-native official
Unicode code points. It may seem to make sense to do so, but broke
multiple CPAN modules which were using U the previous way.
This commit has no effect on ASCII-platform functioning.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the eq_set, eq_hash, and eq_array functions in Test::More are
discouraged to use, and is_deeply is recommended. Ref:
https://metacpan.org/pod/Test::More#Discouraged-comparison-functions
The reason for this is that, if the tests fail, is_deeply has much
better diagnostics.
The other thing is that is_deeply is a test function directly, where
eq_hash and such need to be wrapped inside ok(). This is easy to forget
-- proof of this is in Benchmark.t, where we had this code, that did not
test anything:
eq_set([keys %$got], [qw(Foo Bar Baz)], 'should be exactly three objects');
It is now replaced by:
is_deeply([sort keys %$got], [sort qw(Foo Bar Baz)], 'should be exactly three objects');
this commit replaces all usage of eq_set, eq_hash, and eq_array in lib/
and ext/ for tests that use Test::More.
One small exception is where a negated test is used; Test::More does not
have is_not_deeply() or such. Test2 has `isnt()` for this, but that is
not in core. In those cases, we still keep using the eq_ operators.
|
|
|
|
|
|
|
|
| |
POSIX::FLT_ROUNDS now emulates (more) standard behavior that
reflects the current rounding mode set by fesetround(),
even when compiled with GCC whose FLT_ROUNDS is wrongly fixed to 1.
Also add tests for this.
|
|
|
|
|
|
| |
POSIX::FLT_ROUNDS used to be an NV constant, but C FLT_ROUNDS is
actually an integer and not a constant (C99 seems to say that
it reflects the current rounding mode set by fesetround()).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also, ensure that B::Deparse understands the OA_TARGMY optimisation of
OP_ISBOOL
|
|
|
|
|
|
| |
Turn builtin::true/false into OP_CONSTs
Add a dedicated OP_ISBOOL, make an efficient op version of builtin::isbool()
|
|
|
|
|
| |
UWIN is a UNIX compatibility layer for Windows. It was last released
in 2012 and has been superseded by Cygwin these days.
|
|
|
|
|
|
| |
DJGPP is a port of the GNU toolchain to 32-bit x86 systems running DOS.
The last known attempt to build Perl on it was on 5.20, which only got
as far as building miniperl.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* ext/GDBM_File/GDBM_File.pm: Export gdbm error codes.
Improve documentation.
* ext/GDBM_File/GDBM_File.xs (BOOT): Define the GDBM_File::gdbm_errno
variable.
(gdbm_errno): Return a value usable both in numeric and string
contexts.
* ext/GDBM_File/Makefile.PL: Define gdbm error codes.
* Document GDBM_* constants used with tie().
|