2009/7/2 Paul Fenwick p...@perltraining.com.au:
Since the line in question is using diag(), it already does have a #
prepended to it. AFAIK most TAP parses pass that through to the user by
default.
diag() writes to STDERR by default, so it's noisy and clutters output. Core
tests use Cprint #
On 15/02/2008, Andy Armstrong [EMAIL PROTECTED] wrote:
The 'failure' is the extra 'not' before the pound sign.
I tried to figure out what's causing it, but couldn't.
Is it possible to put the TAP parser into a strict mode where it
would detect
and fault these sorts of things?
I've applied the following patch to TAP::Parser in bleadperl, where it
was necessary to avoid a Use of uninitialized value in uc warning.
Also, I found that it was unnecessary to uc() a parameter both
before and after it was passed to an internal method.
Change 33092 by [EMAIL PROTECTED] on
On 15/11/2007, Jarkko Hietaniemi [EMAIL PROTECTED] wrote:
Maybe we need a way to mark a test or or a set of tests as 'can fail due
to load, bad randomness, and other fluctuating factors, please try at
least N times (with random sleeps in between) before giving up'?
This goes for all of
On 24/10/2007, Andy Armstrong [EMAIL PROTECTED] wrote:
On 24 Oct 2007, at 12:13, H.Merijn Brand wrote:
pc09:/pro/3gl/CPAN/perl-current/t 138 env HARNESS_TIMER=time ./
TEST op/ver.t
t/op/verok 12:18:46
Now (as of r736 from http://svn.hexten.net/tapx/trunk) the output
looks like this:
On 24/10/2007, Andy Armstrong [EMAIL PROTECTED] wrote:
On 24 Oct 2007, at 12:41, Rafael Garcia-Suarez wrote:
[12:34] andy $ prove -rb --timer
[12:34:45] t/000-load..1/2 # Testing HTML::Tiny 0.905
[12:34:45] t/000-load..ok 27 ms
[12:34:45] t/010-simple
On 19/09/2007, Steve Peters [EMAIL PROTECTED] wrote:
On Tue, Sep 18, 2007 at 06:03:13PM -0700, Michael G Schwern wrote:
Jerry D. Hedden wrote:
Michael G Schwern wrote:
http://www.pobox.com/~schwern/src/Test-Simple-0.71.tar.gz
BTW, when to you plan to submit a patch for this against
Andy Armstrong wrote in perl.qa :
TAPx::Parser is now known as TAP::Parser. You can find the latest
CPAN release here:
http://search.cpan.org/dist/TAP-Parser/
and the latest work-in-progress here:
http://svn.hexten.net/tapx/
Changes in this release:
I might have missed that, but looks
Michael G Schwern wrote in perl.qa :
There is a fix for this, something like changing UNIVERSAL::import to be...
sub import {
my($class) = shift;
return unless $class eq 'UNIVERSAL';
...do the export...
}
Oh yes, that used to be a major *kh* problem.
That's
On 26/02/07, chromatic [EMAIL PROTECTED] wrote:
Please reconsider autobox.
I second this request.
autobox in on CPAN and works. Moreover, the intent of the work on
lexical pragmas was to enable people to write their own pragmas and
put them on CPAN. (*) So just use it.
Or, maybe you were
Ovid wrote in perl.qa :
In trying to get runtests to run against the core Perl test suite on a
freshly built download, I'm having a few difficulties. 'make test' says
this:
u=5.02 s=4.72 cu=297.54 cs=98.73 scripts=934 tests=117325
This implies to me that we have 934 .t files in t/,
Ovid wrote in perl.qa :
I've had similar issues with test output out of sequence, especially when
I pipe the output into more or tee (sometimes 21 helps, but not
always).
What about an optional environment variable which forcess *all* output
to STDOUT or STDERR but, if not present, leaves
Gabor Szabo wrote in perl.qa :
While checking if the versions of all the modules are as
required in our installation I am using the following one liner to
fetch the version numbers.
perl -MModule -e'print $Module::VERSION'
You should probably use -mModule to avoid calling Module::import().
Michael G Schwern wrote in perl.qa :
* What about Test::Harness?
Test::Harness remains its own thing.
At some point in the future Test::Harness will likely be gutted and
turned into a thin wrapper around TAP::Harness. I'm not caring about
this right now.
What about prove(1) ? Are you
Andy Lester wrote:
I'm approaching the end of this release cycle. I really want to get
this released.
I've removed the meaningless percentages of tests that have failed.
If you rely on the output at the end, it's different now.
I'm not attached to percentages, which I wasn't looking
On 23/04/06, Steve Peters [EMAIL PROTECTED] wrote:
What's happening above is that TEST cannot handle seeing tests come in
out of order, while harness can. I'm scanning Test::Harness::TAP a bit,
but it seems to be unspecified whether this is OK or not. Should TEST
care if the tests are reported
Andy Lester wrote in perl.qa :
Please try out this dev release. I'd like to make it 2.58 tomorrow.
Now integrated into bleadperl, all tests pass here.
--
* What system had proved more effective?
* Indirect suggestion implicating selfinterest.
-- Ulysses
Andy Lester wrote in perl.qa :
On Mon, Oct 10, 2005 at 02:52:49PM -0700, chromatic ([EMAIL PROTECTED]) wrote:
I do NOT want to see that sort of thing as patches to Test::Harness.
I have a few ideas myself on how to make T::H a little more clean and
useful, but I'd have to do some
On 7/4/05, Michael G Schwern [EMAIL PROTECTED] wrote:
I'm going through some work to restore Test::More and Test::Harness to work
on 5.4.5, minor stuff really, and I'm wondering if its worth the trouble.
Has anyone seen 5.004_xx in the wild? And if so, were people actively
developing using
Michael G Schwern wrote in perl.qa :
On Mon, Apr 18, 2005 at 05:03:42PM +0100, David Cantrell wrote:
1) Am I correct to seperate the package version (1.3004) from the
A small correction -- 1.3004 would be the distribution version, (not
mentioned as $...::VERSION in any package).
Michael G Schwern wrote:
http://svn.schwern.org/svn/CPAN/Test-Simple/trunk
or
svn://svn.schwern.org/CPAN/Test-Simple/trunk
or
http://www.pobox.com/~schwern/src/Test-Simple-0.54.tar.gz
or
a CPAN near you.
Thanks, bleadperl upgraded (as change #23654).
David Wheeler wrote in perl.qa :
Test::LongString is one of those modules that you should be using if
you're doing testing against large data elements, especially web pages.
There are now examples in the docs that I hope make you say Wow, this
is cool, thanks RGS!
I use Text::Differences for
Andrew Pimlott wrote:
Can you tell me where this limitation in perl threads is documented?
Is there any hope that it will be removed in the future?
It's not a limitation, if you share a hash it looks normal to me
that you should share its elements too. (or you end up with weird
quantum hashes
Kirrily Skud Robert wrote:
Here's an initial patch to perlnewmod, the main points of which are:
* recommend module-starter over h2xs
* modernise recommended h2xs invocation
* modernise list of recommended modules to learn from
* refer to Test::Simple and Test::More instead of Test
*
[EMAIL PROTECTED] wrote:
04pause.html has some useful and important information people should
probably read before requesting an account.
It's also linked from http://pause.perl.org/ (about PAUSE); this
latest URL is probably easier to remember.
Andy Lester wrote:
Here's a test file that makes sure that even with sub q{}, that q() is
an operator, but q() and main::q() are function calls. I suggest that
it be called t/comp/operator-subs.t.
Thanks, applied as #23215.
#./perl -T
^^
the lack of ! here gave me a small headache during
Andy Lester wrote:
t/op/sleep.t doesn't actually check to see how long it's slept for. The
test takes sleep()'s word for it.
I also modernized it to use Test::More and its convenience functions.
Thanks, applied as change 23206.
Andy Lester wrote:
Lets you check the dollar vars of your results
matches_are( dog food, qr/dog(.+)/, 1=food, Matched OK );
or
matches_are( first middle end, qr/middle|center/,
= middle, ` = first );
Eventually we'll handle the punc vars, but for now this will do.
Jim Cromie wrote:
Jim Cromie wrote:
folks,
attached patch has following adjustments to B::Concise and its tests.
heres 2nd rev of that patch, now against 22802
Thanks, applied as change 22820. Time to play with it...
Jim Cromie wrote:
Heres a 'working' version of my earlier proposal,
patched against [EMAIL PROTECTED]
I hope you find it useful for regression testing of the optimizer,
and the opcode generation phases.
Thanks, applied to bleadperl as change #22664.
Jim Cromie wrote:
Well, it seems Ive been abusing diag() for some time now :-O
Is there a 'right' way to do this ? perhaps just using ok() ?
ok() goes to stdout by default, diag() to stderr
or maybe a new function, ex: note() is better:
note..ok#
Jim Cromie wrote:
ok() goes to stdout by default, diag() to stderr
which is, I presume, why perl -Ilib t/foo.t produces more output than
make test.
I see that as a feature.I guess note() should go to stderr - for my
preferences at least.
Then just do *note = \diag :)
or maybe a
Andrew Potozniak wrote in perl.qa :
I was wondering if there was anything built in Perl (a Module) that
will take in a Perl file and parse that into an abstract or concrete syntax
tree. I searched around cpan for a bit and couldn't find what I was looking
for. If anyone is wondering
Andy Lester wrote in perl.qa :
prove begins with #!/usr/bin/perl and prove-switches.t
runs it with
my @actual = qx/$prove -Ifirst -D -I second -Ithird -Tvdb/;
A $^X should be inserted here.
(in bleadperl, the shebang line of prove is fixed when installed.)
What should be in prove's
H.Merijn Brand wrote:
t/prove-switchesPerl lib version (v5.6.1) doesn't match executable version
(v5.8.0) at /pro/lib/perl5/5.6.1/PA-RISC2.0/Config.pm line 21.
prove begins with #!/usr/bin/perl and prove-switches.t
runs it with
my @actual = qx/$prove -Ifirst -D -I second -Ithird
Chromatic wrote in perl.qa :
On Mon, 2003-11-17 at 06:54, Potozniak, Andrew wrote:
What's stopping you from creating this global var
and passing it in to the function whenever it is called?
Good taste. If it's going to be more convenient than Test::More's
like(), go all the way and make
Chromatic wrote in perl.qa :
Stuff in t/op mostly can't use Test or Test::More because those modules
rely on the features being tested. Most everything else can use
Test::More. Barring any Unicode-related fiascos (of which I am proudly
and blissfully unaware), they probably haven't been
Thomas Klausner wrote:
there are currently 4 dists on CPAN that only include a configure script
(makepp-1.19, glist-0.9.17a10, swig1.1p5, shufflestat-0.0.3)
179 do not include any of Makefile.PL, Build.PL or configure.
Quite a lot come with two or three of those files.
Could we infer
Nick Ing-Simmons [EMAIL PROTECTED] wrote:
Could we infer that a distribution that comes with several Makefile.PLs
may have an overcomplicated build process, maybe indicating a low
kwalitee ?
Should I infer that to get Tk's kwalitee up it should build as a
one monolithic .so ?
I don't
Michael G Schwern wrote in perl.qa :
This all suggests another check: stray files. Emacs backup files. CVS
directories. Empty directories. #...# backup files. Makefiles shipped
with Makefile.PL, Build and _build shipped with Build.PL, blib/...
In other words, the contents of the default
Thomas Klausner wrote in perl.qa :
Hints that were in Leon's last release, but which I didn't port up to now:
* POD errors
* POD/Code ratio (what would be a good measurement?)
use Pod::Coverage ?
* testers results
* number of releases
Folks,
I've added and integrated a bunch of Test::* modules from bleadperl to
5.6.2. I've also roughly modernized the scripts t/TEST and t/harness
with the bleadperl version, so that all *.t files are found, etc. Now if
you're aware of a difference between bleadperl and CPAN or something, or
if
Andrew savige wrote in perl.qa :
Running variants of:
tar tzf perl-5.8.0.tar.gz | perl -lne'print if tr|-_./a-zA-Z0-9||c'
suggests only [-_./a-zA-Z0-9] are valid characters in a path name.
Then I noticed 'perldoc perlport' lists the portable filename
characters as defined by ANSI C and
Michael G Schwern wrote in perl.qa :
http://www.pobox.com/~schwern/cgi-bin/perl-qa-wiki.cgi
Do you want a link to this from qa.perl.org ?
Michael G Schwern wrote in perl.qa :
The only part missing is the ability to shut the tests off once you've
released it to production.
You could perhaps use the assertion feature of perl = 5.9.0
(assertion.pm and -A switch -- yes I know it lacks docs.)
Fergal Daly wrote:
Also how about calling it Test::Warn::Auto? I'm not particularly happy with
None,
+1 for ::Auto.
BTW, what about modules that define their own category of warnings
(via warnings::register) ? It'd be useful to have a module to ease
testing for warnings presence/absence on
Michael G Schwern wrote in perl.qa :
On Tue, Jun 24, 2003 at 01:36:52PM +0200, Rafael Garcia-Suarez wrote:
BTW, what about modules that define their own category of warnings
(via warnings::register) ? It'd be useful to have a module to ease
testing for warnings presence/absence on certain
Michael G Schwern wrote in perl.qa :
On Tue, Jun 24, 2003 at 02:04:25PM -0500, Andy Lester wrote:
All this make sure no warnings fired is good thinking. But why not
roll it into Test::Harness, and make it switch selectable? It's
really T::H that we want keeping an eye on this, right?
schwern wrote in perl.qa :
Degenerative cases aside, a very good test of actual code anyone would
use in production in real life for a Perl parsing attempt is
Test::More (since it has a few odd constructs and a good test suite),
Good advice. Test::More actually helped me to find bugs in
Vlad Harchev wrote:
I'm testing some perl source code transformation tool (kinda perl source
code prettifier). I would like to test
it by running over some huge software package written in perl that have
testsuites written for it available (i.e. I would like to transform some
package's
Mark Fowler [EMAIL PROTECTED] wrote:
I'd like to have a custom version of is(), say binary_is(), that
reports 'strings 1 and 2 differ at byte 635, got 0x92, expected 0x42'
or 'strings 1 differ in length, got 3874, expected 3875'.
Oooh, that would be really helpful. I often find myself
Mark Fowler [EMAIL PROTECTED] wrote:
I'd like to have a custom version of is(), say binary_is(), that
reports 'strings 1 and 2 differ at byte 635, got 0x92, expected 0x42'
or 'strings 1 differ in length, got 3874, expected 3875'.
Oooh, that would be really helpful. I often find myself
Hi, here's an easy question for you Test:: experts :
I write lots of test those days with is() comparing binary
strings (mainly produced by combination of pack() and other
algorithms.) The problem is that the output message of is()
when those tests fail is not very helpful.
I'd like to have a
[EMAIL PROTECTED] wrote:
For a more fine-grained view, you
need hooks into Perl internals (such as the Perl malloc).
This sounds like Devel::Peek::mstat(). But I never looked at this before.
alian [EMAIL PROTECTED] wrote:
* searchable for the past (and for keywords in failures or fulltext, like
bigint
Yep I will add this shortly.
* spares me the smoke foo messages, that contain all Ok and fool me into
thinking there was some smoke
Sorry my so poor english doesn't
Tels wrote in perl.qa :
--- Cover.pm.old Wed Sep 4 23:36:14 2002
+++ Cover.pm Wed Sep 4 23:38:46 2002
-144,6 +144,8 sub report
for my $sub (Todo)
{
+next unless $sub-[1]-CV-isa('B::CV');
That's a guard against a B::SPECIAL object, isn't it ?
Well, B::SPECIAL
Tels wrote in perl.qa :
Well, B::SPECIAL is for one of the internal constants '0', '1' and
'undef'. There ought to be a better interface to this, but I can't
really figure out what to improve.
I have no idea what you talk about - I am a total B:: newbie :)
The big story :
Each time a
Tels wrote in perl.qa :
--- Cover.pm.old Wed Sep 4 23:36:14 2002
+++ Cover.pm Wed Sep 4 23:38:46 2002
-144,6 +144,8 sub report
for my $sub (Todo)
{
+next unless $sub-[1]-CV-isa('B::CV');
That's a guard against a B::SPECIAL object, isn't it ?
Well, B::SPECIAL
Tels wrote in perl.qa :
Well, B::SPECIAL is for one of the internal constants '0', '1' and
'undef'. There ought to be a better interface to this, but I can't
really figure out what to improve.
I have no idea what you talk about - I am a total B:: newbie :)
The big story :
Each time a
Michael G Schwern wrote:
I keep forgetting that I need to remember to ask this. Is there a FAQ
for regression test writing? Well, an guide to so I want to write a
regression test, explaining how to do it, how perl5's tests are structured
to reduce interdependencies, use Test::More; when
Andy Lester wrote in perl-qa :
I can do this:
use PHP::Session 0.10;
to ensure a version number, but I can't do this:
use_ok( 'PHP::Session', '0.10' );
The optional args to use_ok are for imports, not for version numbers.
[...]
Before I go digging into a patch, is this
Andy Lester wrote in perl-qa :
I can do this:
use PHP::Session 0.10;
to ensure a version number, but I can't do this:
use_ok( 'PHP::Session', '0.10' );
The optional args to use_ok are for imports, not for version numbers.
[...]
Before I go digging into a patch, is this
On 2002.01.13 22:25 Michael G Schwern wrote:
Why would this:
BEGIN {
push @INC, 'foo';
}
put 'foo' into @INC twice if it were compiled? The compiled program
should not be storing the post-BEGIN value of @INC, it should store
the original value at startup.
The
On 2002.01.14 22:27 Michael G Schwern wrote:
B::Deparse has slowly gotten very good at figuring out BEGIN blocks
from 'use' statements and putting them in the right places. Hard
fought knowledge. Steal from it.
There are still problems with pragmas. (As I was working on B::Deparse
the last
On 2002.01.14 17:29 Michael G Schwern wrote:
On Mon, Jan 14, 2002 at 11:13:27AM +0100, Rafael Garcia-Suarez wrote:
On 2002.01.13 22:25 Michael G Schwern wrote:
Why would this:
BEGIN {
push @INC, 'foo';
}
put 'foo' into @INC twice if it were compiled
On 2002.01.14 22:27 Michael G Schwern wrote:
B::Deparse has slowly gotten very good at figuring out BEGIN blocks
from 'use' statements and putting them in the right places. Hard
fought knowledge. Steal from it.
There are still problems with pragmas. (As I was working on B::Deparse
the last
On 2002.01.05 23:45 Michael G Schwern wrote:
Here's an interesting alternative. Do Clocal $^C = 0 just before
running the tests, though that's pretty ugly.
Interesting idiom, but I don't see when this can be done.
But I rwally like the environment variable better, because with the
On 2001.10.20 17:16 Jarkko Hietaniemi wrote:
On Sat, Oct 20, 2001 at 02:02:59AM -0400, Michael G Schwern wrote:
I think installhtml teeters heavily on the brink of Rewriting
instead of Refactoring. It hasn't changed much since 1997.
Refactoring is just rewriting in small pieces.
Michael G Schwern listed:
[...]
warnings::register (almost no docs)
There are no tests for warnings.pm either.
Note that there are two distinct points here :
1. test the warnings issued by the perl interpreter; this is done by
lib/warnings.t, that calls the various files in
On 2001.09.19 17:37 Paul Marquess wrote:
Nope, it does both. The test files that start with digits are intended to
test the features of the warnings pragma itself along with it's interaction
with $^W. All the other files test specific warnings.
The tests for warnings::enabled and
70 matches
Mail list logo