summaryrefslogtreecommitdiff
path: root/lib/perl5db.t
Commit message (Collapse)AuthorAgeFilesLines
* lib/perl5db.t: remove debugging codeDavid Mitchell2017-11-151-1/+0
| | | | A spurious printf was inadvertently added by me with e05a85b2.
* fix Perl_get_cvn_flags() return valueDavid Mitchell2017-11-011-0/+1
| | | | | One branch returned an SV* when it should return CV*. This upset g++.
* Add tests for 'p' and 'x' commands without subsequent whitespace.James E Keenan2017-09-301-1/+85
| | | | | | | Tests pass on perl-5.16.3 but should fail (until source code is corrected) on subsequent versions. For: RT #120174
* Prevent tests from getting hung up on 'NonStop' option.James E Keenan2016-12-301-0/+2
| | | | | | | For: https://rt.perl.org/Ticket/Display.html?id=130445 Thanks to Håkon Hægland for report and suggestion. Simplify revisions, per feedback from Aaron Crane.
* Fix test failure in lib/perl5db.t when mandoc is installedAndreas Voegele2016-05-091-1/+1
|
* Ensure 'q' works in debugger with RemotePort.Shlomi Fish2015-12-021-1/+17
| | | | | | Patch submitted by Shlomi Fish. For: RT #126735
* Fix RT#71678 (-d a command after exit) with a test.Shlomi Fish2015-06-031-1/+26
| | | | | Credits to Heiko Eissfeldt for the reported bug, the test program and a proposed fix.
* Fix like/is problem in perl5db.t.Craig A. Berry2014-06-271-6/+6
| | | | | | | aaa63daea7f8ece changed like to is, which turned out not to be quite the same thing for these tests on VMS, where the last line of a file always gets a newline before EOF willy nilly. So keep is but make the newline explicit.
* Make like() and unlike() in t/test.pl refuse non-qr// argumentsÆvar Arnfjörð Bjarmason2014-06-211-4/+4
| | | | | | | | | | | | | | | As I noted in v5.21.1-12-g826af13 we have subtle bugs in the test suite because you can do e.g. like($@, '') now which'll be a passing test even when we have an error, because $@ =~ // will be true. I'm just changing t/test.pl to not accept non-Regexp arguments, and fixing up a bunch of test failures that resulted from that. There might still be more of these in tests that I'm just not running, I've also changed some of these from $str =~ /foo/ to $str eq 'foo' (i.e. s/like/is/) in cases where that appeared to work, but it might break some systems. Let's just find that out via the smokers.
* Fix RT #121509 : perl -d handling chdir().Shlomi Fish2014-05-281-1/+50
| | | | | | | | | See: https://rt.perl.org/Ticket/Display.html?id=121509 [perl #121509] perl debugger doesn't save starting dir to restart from Thanks to Linda Walsh for reporting the problem and RJBS for commenting for initial approval. Fix and a regression test by Shlomi Fish.
* [perl #121081] workaround different output on VMSTony Cook2014-02-191-5/+6
| | | | | VMS is a special snowflake, deal with the slightly different debugger output it produces.
* Fix perl5db.t test 41 on VMS.Craig A. Berry2014-01-181-3/+3
| | | | | | We're getting newlines in between items, and the easiest way to deal with it is make them explicit so we expect what we're getting and it's done the same everywhere.
* [perl #118817] avoid using 2 handles to write to the debug outputTony Cook2014-01-151-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the tests were run with the following config: NonStop=0 TTY=db.out LineInfo=db.out This meant that the debugger would write the prologue, command prompts and their results and the epilogue to one handle, and any line trace information to the second handle. Since those handles didn't share a file position, the line trace info would overwrite the prologue, and the epilogue would overwrite part of the line trace info. When TTY=vt100 on Redhat systems this made the epilogue just long enough to overwrite the line trace data that a test matched against, causing the test to fail. To fix this, I avoided setting LineInfo: NonStop=0 TTY=db.out and since LineInfo defaults to using the TTY handle, both types of content are written to db.out *without* overwriting each other. Unfortunately this broke some other tests, since the command prompts which were overwritten by line trace information are now mixed in with the line traces - I've modified the tests that failed to account for the included command lines.
* Skip the perldoc test if 'man' is missingNiko Tyni2013-08-221-0/+2
| | | | | This fixes a test failure in minimal build environments without a 'man' command.
* Correct spelling of LC_MESSAGESNiko Tyni2013-08-211-1/+1
|
* Remove some effect-less code.Shlomi Fish2013-08-101-15/+0
| | | | Discussed in RT #41461
* Fix RT #41461 (with a test).Shlomi Fish2013-08-101-1/+9
| | | | | | | A problem with the perl debugger of writing to an undef $LINEINFO. Bump $VERSION to 1.42. For: RT #41461
* [perl #118839] Make ‘n’ debugger cmd respect lv subsFather Chrysostomos2013-07-131-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ‘n’ debugger command, which is supposed to step over subs, was not stepping over lvalue subs. This is a regression from 5.8, but 5.8 was worse. This bug did not occur in 5.8 because there was no mechanism back then for handling lvalue subs specially (via DB::lsub), so assignment to an lvalue sub was completely broken under the debugger. Perl 5.10 introduced DB::lsub. The implementation in perl5db.pl contains these lines at the end of the sub: # Pop the single-step value back off the stack. $single |= $stack[ $stack_depth-- ]; # call the original lvalue sub. &$sub; The regular DB::sub does this: { no strict 'refs'; @ret = &$sub; } # Pop the single-step value back off the stack. $single |= $stack[ $stack_depth-- ]; Notice how $single (i.e., $DB::single) is modified before and after the sub call, respectively. The order is different. There are two types of lvalue list context for lvalue subs. (foo)=3 will allow sub foo:lvalue{@a} to return the array itself. \(foo) and bar(foo) will flatten the array. So there is no way in pure Perl to capture the return value and have it returned to the caller unchanged. That is why DB::lsub has to call the sub last of all (and have the context propagated). The solution here is to use localisation to accomplish the assigment to $single after the lvalue sub exits.
* Suppress system Term::ReadLine::GnuPetr Písař2013-07-091-0/+1
| | | | | | | | | | | | | | | | | | | perl5db.t will die in Term::ReadLine if Term::ReadLine::Gnu is installed in the system. Let's favour core implementation. Best solution would be to prune @INC to prevent from loading already installed modules like this: BEGIN { use Config; @INC = grep { ! /^\Q$Config{installprefix}\E(\/|\z)/ } @INC; } However that is not possible (now) due to various execs (even without proper -I) in the harness chain. perl should implement -nostdinc option. Signed-off-by: Petr Písař <ppisar@redhat.com>
* Fix the mutability of @_ in perl -d.Shlomi Fish2013-06-101-1/+23
| | | | | | With a test. See Father C.'s comment on RT #118169.
* Fix for RT #118169Shlomi Fish2013-06-101-1/+23
| | | | | | | | | | https://rt.perl.org/rt3/Public/Bug/Display.html?id=118169 subroutine arguments are no longer shown in perl debugger ( x @_ in perl -d) . Regression from perl-5.16.x due to the perl -d refactoring. Fixed with a test.
* On Linux LC_ALL overrides LC_MESSAGES, so tweak perl5db.t accordingly.Nicholas Clark2013-05-271-0/+1
| | | | | Without this, the test fails when LC_ALL is set to a non-English locale for which man has been localised.
* man perlrules doesn't always output "No manual entry for perlrules"Tony Cook2013-05-271-0/+5
| | | | | | | especially when the locale is non-English. Hopefully all Linux dists are producing the same message, and force the language to "C" so we get English messages.
* Fix the man/perldoc/doc command in the debugger.Nicholas Clark2013-05-251-1/+21
| | | | This was accidentally broken by commit c7b0c61d36b24841.
* lib/perl5db.t: Add test for bug #116771, autotrace crashes debuggerKent Fredric2013-03-181-1/+8
|
* lib/perl5db.t: Add test for bug #116769, Frame=2 crashes debuggerKent Fredric2013-03-181-1/+8
|
* Missing test count.Shlomi Fish2013-01-021-1/+1
| | | | Merge-SNAFU.
* Fix perl -d's 'w $my_lexical_variable'.Shlomi Fish2013-01-021-1/+29
| | | | | This was done by reverting parts of the offending commit from the git bisecting and adding a test. Thanks to Kevin Dawson for the report.
* Fixed the test - it passes now.Shlomi Fish2013-01-021-1/+1
| | | | | Thanks to Father Chrysostomos for fixing the bug in blead, I was now able to fix the test in the debugger.
* Add a testcase for the bug.Shlomi Fish2013-01-021-0/+24
| | | | | | | | It is caused by $obj spontaneously becoming undef for no good reason - seems like a bug in the perl interpreter (or elsewhere). This was noticed by Father C here: https://rt.perl.org/rt3/Ticket/Display.html?id=114926
* fix the debugger t expr command regressionTony Cook2012-12-171-2/+0
|
* rough TODO test for t exprTony Cook2012-12-171-1/+26
|
* Fix "a [command]" statement.Shlomi Fish2012-11-121-2/+24
| | | | | | Without a line number. See: https://rt.perl.org/rt3/Ticket/Display.html?id=115110 .
* [perl5db] Fix a bug - with a test.Shlomi Fish2012-11-121-1/+21
| | | | The problem was that the arguments in print_help were not extracted correctly.
* Add a test for the frame option.Shlomi Fish2012-11-121-1/+29
|
* [perl5db] o PrintRet=0 in void context.Shlomi Fish2012-11-121-1/+26
|
* Test o PrintRet=1 in void context.Shlomi Fish2012-11-121-1/+26
|
* [perl5db] Add another test.Shlomi Fish2012-11-121-1/+26
|
* [perl5db] Test o PrintRet in list context.Shlomi Fish2012-11-121-1/+26
|
* [perl5db] add a test for o PrintRet=0.Shlomi Fish2012-11-121-2/+27
|
* Add a test for o PrintRet.Shlomi Fish2012-11-121-1/+26
|
* Test o inhibit_exit=0.Shlomi Fish2012-11-121-1/+26
|
* Fix a bug with o AutoTrace.Shlomi Fish2012-11-121-1/+27
| | | | There it was.
* [perl5db] Add a test for t command with sub calls.Shlomi Fish2012-11-121-1/+28
|
* [perl5db] Test o AutoTrace .Shlomi Fish2012-11-121-1/+25
| | | | It appears to work fine now. Strange.
* [perl5db] Add a test for the 't' command.Shlomi Fish2012-11-121-1/+25
| | | | | Apparently, the 'o AutoTrace' command is broken since perl-5.16.x and I want to get a good output for 't' first before fixing it.
* [perl5db] Add a test for warnLevel=1.Shlomi Fish2012-11-121-1/+26
|
* [perl5db] Add test for dieLevel option.Shlomi Fish2012-11-121-1/+27
|
* [perl5db] Test the recallCommand option.Shlomi Fish2012-11-121-1/+30
|
* [perl5db] Test the M command.Shlomi Fish2012-11-121-1/+22
|