summaryrefslogtreecommitdiff
path: root/t/test.pl
Commit message (Collapse)AuthorAgeFilesLines
* Add a warning to test.pl if quotes are used in one-liners.Nicholas Clark2010-09-241-0/+4
| | | | | | Fix all the tests that were using quotes, and (by implication) working because barewords are treated as strings, and one-liners aren't run under strict.
* Add new_ok() to create and test objects. From Test::More.Michael G. Schwern2010-09-151-0/+27
|
* Add note() to put informational notes into the TAP (from Test::More)Michael G. Schwern2010-09-151-4/+14
|
* Add done_testing from Test::MoreMichael G. Schwern2010-09-151-0/+11
|
* Shut up "used only once" warnings.Michael G. Schwern2010-09-151-2/+6
| | | | Not very elegant, but it avoids using $^W or warnings.pm.
* 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.
* Ensure new arg to watchdog() in t/test.pl gets initializedJerry D. Hedden2010-07-051-1/+1
|
* Force t/io/openpid.t to use the alarm() watchdog strategy.George Greer2010-07-041-1/+7
| | | | | | | | | | | | | | | * The default watchdog strategy on Win32 doesn't work because the watchdog is executed via subshell ("cmd /c perl -e '...'"). When the test finishes and tries to kill the watchdog all it manages to do is whack cmd.exe and the watchdog still fires, potentially killing an innocent process. * Trying to use the fork() strategy instead causes openpid.t's test #9's "ok" to be lost occasionally. The message itself is generated by the 4th child of the test and should go directly to stdout, but sometimes the output vanishes for unexplained reasons. This doesn't appear to happen without the watchdog enabled. * Using the alarm() watchdog strategy seems to not cause any badness.
* Adjust 'make test.valgrind' to account for cpan/dist/ext separation.George Greer2010-07-031-0/+3
| | | | Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
* Add functions to test.pl for easier EBCDIC testingKarl Williamson2010-05-251-1/+126
| | | | | | | | | | | | | | | This patch adds functions native_to_latin1($) and latin1_to_native($) to test.pl. Use of these in test scripts allows for less special case code (or deciding to blow it off and just skip EBCDIC platforms). If a string is all ASCII, one has always been able to just use it and not worry about EBCDIC. But non-ASCII, latin1 characters have been a different matter. This allows one to wrap those characters in a function call and get automatic EBCDIC compatibility. The functions do not handle UTF-8/UTF-EBCDIC conversions. This is more complicated, and I was worried that that part was not appropriate for test.pl which should use the bare minimum of Perl functionality. These functions use tr///, beyond what other parts of test.pl use.
* Don't scrub DCL$PATH unless it's there.Craig A. Berry2010-03-011-1/+1
| | | | It's optional and this was causing test failures when it didn't exist.
* t/test.pl fresh_perl_like() bughv@crypt.org2009-12-041-3/+1
| | | | | | | | | | The existing code does the wrong thing if a string (rather than a compiled regexp) is supplied for $expected. Happily perl will do the right thing if you let it. Hugo Message-Id: <200912041444.nB4EiqBj004436@zen.crypt.org>
* Use hex instead of octal for larger code pointsKarl Williamson2009-11-231-1/+10
|
* Make the watchdog create a valid command for spawning.Craig A. Berry2009-10-161-3/+3
| | | | | It was inserting a newline in the command string, which causes a syntax error (at least on VMS).
* Make _quote_args() return a result, rather than passing it a scalar reference.Nicholas Clark2009-10-091-3/+4
| | | | | | This was the only use of scalar references in test.pl, and the only use of \ to create a reference to a scalar. We are now more robust in the face of parser or runtime bugs.
* Avoid using ++, op= and anon hash constructors in the testing code.Nicholas Clark2009-10-091-17/+24
| | | | | | {} could be misparsed, ++ has a lot of internal implementation "magic" that we don't need, but don't want to trip us up if it isn't working, and op= isn't necessary when we already rely on the more general $a = $b op $c working.
* Remove code specific to MacOS Classic from core testsRafael Garcia-Suarez2009-09-081-24/+2
|
* Output failures in an always printable formKarl Williamson2009-09-051-7/+7
|
* Make fresh_perl_is() strip newlines off the expected result just like it ↵Michael G. Schwern2009-07-221-1/+6
| | | | does the result so tests don't weirdly fail just because the author didn't realize it was normalizing newlines.
* Change "use $foo; 1" in evals to "require $foo; 1" to avoid breakingNicholas Clark2008-10-201-6/+6
| | | | | even more tests if use is borked, but not require. p4raw-id: //depot/perl@34528
* Loading modules in test.plJerry D. Hedden2008-09-271-7/+4
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510809230640y2d5a072g6abff6604f9daa79@mail.gmail.com> p4raw-id: //depot/perl@34434
* Watchdog re-queueJerry D. Hedden2008-09-101-5/+3
| | | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510809090654v2de48f1r37499d573f452cdb@mail.gmail.com> Date: Tue, 9 Sep 2008 09:54:41 -0400 p4raw-id: //depot/perl@34337
* Make sure the watchdog requeues itself when sleep() wakes up earlyCraig A. Berry2008-09-081-4/+12
| | | | | | | (such as when an alarm fires). Also, bail out with SIGTERM rather than SIGKILL on VMS since the latter kills the shell from which Perl was started. p4raw-id: //depot/perl@34316
* Fix bug in counting in tempfile().Nicholas Clark2008-08-071-7/+12
| | | | | | | | Also we need to note file names we give out, as some callers don't create them before calling us a second time. Add a regexp that matches the tempfile() names, for tests that want to munge output. p4raw-id: //depot/perl@34179
* A proper tempfile function that can be used multiple times.Nicholas Clark2008-08-071-2/+9
| | | p4raw-id: //depot/perl@34178
* Better temporary file name generation. (Avoid using ++, avoid fileNicholas Clark2008-08-061-5/+20
| | | | | | names clashing between different scripts, which may now be executing in parallel) p4raw-id: //depot/perl@34173
* watchdog() fix for MSWin32Jerry D. Hedden2008-07-231-0/+1
| | | | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510807230919p355ea37ci3fde2c1f84df6d5f@mail.gmail.com> Adds a needed diag message to the watchdog() function for MSWin32. p4raw-id: //depot/perl@34154
* Fix skips in test.plJerry D. Hedden2008-07-221-3/+3
| | | | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510807180609l7ca8a8d8i653dfd687ed9f36d@mail.gmail.com> Changes skip messages to be consistent with Test::Builder. p4raw-id: //depot/perl@34152
* test.plJerry D. Hedden2008-07-161-4/+4
| | | | | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510807110807hb3e3727la161367a63da607f@mail.gmail.com> Jerry found that localizing $? doesn't shield the effects of wait() unless you actually assign something to $? p4raw-id: //depot/perl@34147
* test.pl fixJerry D. Hedden2008-07-081-56/+81
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510807071029q5931f03ud506f06b7d1f72af@mail.gmail.com> p4raw-id: //depot/perl@34109
* Avoid using -> function call notation within test.pl, which is supposedNicholas Clark2008-07-011-3/+1
| | | | | | to keep to simple constructions to facilitate accurately testing the core interpreter, which might be buggy. p4raw-id: //depot/perl@34097
* common test code for timed bailJerry D. Hedden2008-06-281-0/+102
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510806281218i65d32061w27a4431b9b357107@mail.gmail.com> p4raw-id: //depot/perl@34091
* shield t/test.pl functions from global print modifiersMichael G. Schwern2008-01-021-17/+28
| | | | | Message-ID: <477AF314.9050808@pobox.com> p4raw-id: //depot/perl@32801
* Must have /bin under CygwinJerry D. Hedden2007-12-111-0/+2
| | | | | | From: "Jerry D. Hedden" <jdhedden@cpan.org> Message-ID: <1ff86f510712111035u7f8da6e8h1a1cbd9d85d27c03@mail.gmail.com> p4raw-id: //depot/perl@32611
* Re: Smoke [5.10.0] 31938 FAIL(F) netbsd 3.1 (i386/1 cpu)Abe Timmerman2007-09-251-1/+1
| | | | | Message-ID: <46F59EFE.7050303@ztreet.demon.nl> p4raw-id: //depot/perl@31962
* Give accurate failure diagnostics when unlike() fails.Nicholas Clark2007-04-061-1/+2
| | | p4raw-id: //depot/perl@30855
* test.pl should locally increase $Level, rather than setting it to aNicholas Clark2007-02-181-1/+1
| | | | | | hard value, so that callers of like and unlike can present diagnostics with the line number of their own caller. p4raw-id: //depot/perl@30344
* It's all relative -- better handling of tainted directoriesCraig A. Berry2006-06-021-1/+2
| | | | | in PATH on VMS (and scrubbing them in t/test.pl). p4raw-id: //depot/perl@28348
* Change 28037 broke t/op/each.t when running with TEST.Nicholas Clark2006-05-021-0/+2
| | | p4raw-id: //depot/perl@28059
* Re: [PATCH] provide diag() and don't use ++ in test.plDavid Landgren2006-05-011-5/+23
| | | | | | | | Message-ID: <4456120B.3000302@landgren.net> Plus some additional comment (also from David) about WHY not to use ++ in test.pl p4raw-id: //depot/perl@28037
* Avoid "uninitialized value" warnings during 'make test'.Gisle Aas2006-03-201-1/+1
| | | | | | My system is set up with a few PATH entries I'm not allowed to access, so stat() fails for these. p4raw-id: //depot/perl@27551
* Also strip $ENV{PATH} dirs writable by world.Gisle Aas2006-03-201-1/+1
| | | | | The stripping was introduced in change 27364 to improve taint handling. p4raw-id: //depot/perl@27550
* Taint handling for runperl:H.Merijn Brand2006-03-021-16/+21
| | | | | | - better taint detection (switch -T in command) - $ENV{PATH} stripping of writeable directories on unix/linux p4raw-id: //depot/perl@27364
* Move all the de-tainting logic for runperl into test.pl.Nicholas Clark2006-02-271-7/+27
| | | p4raw-id: //depot/perl@27345
* Assume that if runperl is called under tainting, that the caller reallyNicholas Clark2006-02-181-0/+9
| | | | | really wanted to run perl, so brute force untaint everything. p4raw-id: //depot/perl@27220
* like and unlike weren't reporting failure where correctly in test.plNicholas Clark2005-12-231-0/+1
| | | p4raw-id: //depot/perl@26469
* TODO-SKIP tests must be "not ok", or else the test harness will thinkYves Orton2005-12-191-1/+1
| | | | | | | | it's an unexpected success Subject: Re: Change 26165 broke ext/threads/t/stress_re.t test on Win32 (and patch to t/test.pl and/or Test::Harness) Message-ID: <9b18b3110512170823q1bb2cd27h838b4d4dcdba72c9@mail.gmail.com> p4raw-id: //depot/perl@26398
* Upgrade to IO 1.22 from gbarrRafael Garcia-Suarez2005-09-061-0/+62
| | | | | | | | - Adjust the regression tests to use t/test.pl from bleadperl when $ENV{PERL_CORE} is defined - Add can_ok and isa_ok to t/test.pl from the implementation found in the IO CPAN distribution p4raw-id: //depot/perl@25355
* Re: [perl #36622] y/// at end of fileMichael G. Schwern2005-08-011-1/+1
| | | | | Message-ID: <20050722185115.GB28829@windhund.schwern.org> p4raw-id: //depot/perl@25252
* Introduce PERL_RUNPERL_DEBUG to alter the behavior of runperl(),Rafael Garcia-Suarez2005-06-151-0/+4
| | | | | this can be useful to use valgrind for example p4raw-id: //depot/perl@24856