On Sat, Nov 14, 2009 at 10:29:20PM -0600, Jonathan Rockway wrote:
* On Mon, Nov 09 2009, David Cantrell wrote:
On Mon, Nov 09, 2009 at 11:41:21AM +0100, Philippe Bruhat (BooK) wrote:
On Mon, Nov 09, 2009 at 02:24:11AM -0800, Ovid wrote:
Thinking about this more, what about a compile_ok()?
* On Mon, Nov 09 2009, David Cantrell wrote:
On Mon, Nov 09, 2009 at 11:41:21AM +0100, Philippe Bruhat (BooK) wrote:
On Mon, Nov 09, 2009 at 02:24:11AM -0800, Ovid wrote:
Thinking about this more, what about a compile_ok()?
compile_ok() would certainly be interesting with scripts shipped with
- Original Message
From: Jonathan Rockway j...@jrock.us
Why use a script at all? They are clearly difficult to test, and code
that is difficult to test is where the bugs always hide.
Because there's a lot of legacy code out there and much of it is in the form of
scripts. The best
On Mon, Nov 09, 2009 at 12:15:52PM -0500, Erik Osheim wrote:
On Mon, Nov 09, 2009 at 04:32:18PM +, David Cantrell wrote:
Why not test that the script *works*, not just that it compiles?
That's a good idea. Maybe something like run_ok()?
No, test that it does what it says on the tin, like
I've been toying with this thought for a while: discourage (not quite
deprecate) use_ok() and require_ok(). I've written up some of the problems
with the former (http://use.perl.org/~Ovid/journal/39859) and the latter still
has the or die problem.
For the life of me, I can't really see any
--- On Mon, 9/11/09, Ovid publiustemp-perl...@yahoo.com wrote:
From: Ovid publiustemp-perl...@yahoo.com
The *only* use I've ever had for use_ok() has been in a
t/00-load.t test which attempts to load all modules and does
a BAIL_OUT if it fails. I'm sure there are other use
cases, but if
On Mon, Nov 09, 2009 at 02:24:11AM -0800, Ovid wrote:
--- On Mon, 9/11/09, Ovid publiustemp-perl...@yahoo.com wrote:
From: Ovid publiustemp-perl...@yahoo.com
The *only* use I've ever had for use_ok() has been in a
t/00-load.t test which attempts to load all modules and does
a BAIL_OUT
--- On Mon, 9/11/09, Philippe Bruhat (BooK) philippe.bru...@free.fr wrote:
compile_ok() would certainly be interesting with scripts
shipped with
a module, that usually have very little meat that needs
testing (since
most of the work is done in the modules), but that one
would at least
On Mon, Nov 9, 2009 at 12:41 PM, Philippe Bruhat (BooK)
philippe.bru...@free.fr wrote:
On Mon, Nov 09, 2009 at 02:24:11AM -0800, Ovid wrote:
--- On Mon, 9/11/09, Ovid publiustemp-perl...@yahoo.com wrote:
From: Ovid publiustemp-perl...@yahoo.com
The *only* use I've ever had for use_ok() has
On Mon, Nov 09, 2009 at 02:11:23AM -0800, Ovid wrote:
For the life of me, I can't really see any utility to use_ok() or
require_ok(). Not only are both fragile and a source of strange
action at a distance bugs, but the constructs they replace not only
work correctly, but can be viewed as
On Mon, Nov 09, 2009 at 02:11:23AM -0800, Ovid wrote:
What do people think? Should we start discouraging the use of these tests?
I've never found them useful and, as you note, they can cause pain. I
remember narrowing down one Devel::Cover bug report to the code being covered
not putting
(n Mon, Nov 9, 2009 at 5:11 AM, Ovid publiustemp-perl...@yahoo.com wrote:
For the life of me, I can't really see any utility to use_ok() or
require_ok(). Not only are both fragile and a source of strange action at a
distance bugs, but the constructs they replace not only work correctly, but
--- On Mon, 9/11/09, David Golden xda...@gmail.com wrote:
From: David Golden xda...@gmail.com
I don't see any problem with require_ok. I've found
it useful as a
cheap sanity check and don't see the action at a distance
problems you
imply.
use Test::More tests = $gazillion;
require_ok
On Mon, Nov 09, 2009 at 11:41:21AM +0100, Philippe Bruhat (BooK) wrote:
On Mon, Nov 09, 2009 at 02:24:11AM -0800, Ovid wrote:
Thinking about this more, what about a compile_ok()?
compile_ok() would certainly be interesting with scripts shipped with
a module, that usually have very little meat
On 11/09/2009 05:24 AM, Ovid wrote:
Thinking about this more, what about a compile_ok()? It merely asserts that the code
compiles (in an anonymous namespace, perhaps?), but doesn't make any guarantees about you
being able to even use the code -- just that it compiles. It wouldn't need to be
On Mon, Nov 09, 2009 at 04:32:18PM +, David Cantrell wrote:
Why not test that the script *works*, not just that it compiles?
That's a good idea. Maybe something like run_ok()?
-- Erik
# from Ovid
# on Monday 09 November 2009 02:11:
but can be viewed as tests themselves! If either use My::Module or
require My::Module fails, ...
Yeah, that's how I always do it.
The *only* use I've ever had for use_ok() has been in a t/00-load.t
test which attempts to load all modules and
- Original Message
From: Erik Osheim e...@plastic-idolatry..com
To: perl-qa@perl.org
Sent: Mon, 9 November, 2009 17:15:52
Subject: Re: Discourage use_ok?
On Mon, Nov 09, 2009 at 04:32:18PM +, David Cantrell wrote:
Why not test that the script *works*, not just
18 matches
Mail list logo