Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^4: Test driven development with Perl and vim

by gaal (Parson)
on Mar 01, 2005 at 19:37 UTC ( #435588=note: print w/replies, xml ) Need Help??

in reply to Re^3: Test driven development with Perl and vim
in thread Test driven development with Perl and vim

Good point about taint mode. And -l can't hurt either, so I'm adding it too, though in all my new projects I've stopped with the (h2xs-originated, I think) legacy of putting everything under lib/. Well, actually if it's a web project I *do* use lib/ (and htdocs/ etc); but otherwise it's just snappier to use the main directory as the root for libraries.

I'm not sure why you need the separate binding for compilation at all? I actually see it as a feature that Prove() does the Right Thing depending on whether the file is a test or not. (After all, if your test fails compile, quickfix will put you in the right place even if the compilation error happened when you tried to run the test.) Think of it as polymorphism at keybinding time :)

Thanks for the comments!

Update: Interesting thinko on my part, taking "verbose" for "taint". Well, I suppose they both tend to produce mode output than the regular checks :) I'm not convinced a verbose launch deserves a keybinding of its own — how often do you alternate? — maybe it's better to make both taint and verbose modes global options and keep the keys simple.

Replies are listed 'Best First'.
Re^5: Test driven development with Perl and vim
by dragonchild (Archbishop) on Mar 02, 2005 at 13:21 UTC
    If a failed test occurs when using ",t" then I want to re-run that specific testfile using ",T" so that I can see the helpful messages I put into each ok() statement. In Excel::Template, for example, I have almost 200 tests over 24 files and hope to be at 500 over 50+ before all is said and done. Each test file generally has between 4 and 20 tests, which is a manageable amount of output. 200 isn't.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      I guess we need something that sets TEST_VERBOSE=1 when a regular ,t produced failures (and maybe, if the ,w target was unset, set it to the failing testfile).

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://435588]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2021-04-11 18:42 GMT
Find Nodes?
    Voting Booth?

    No recent polls found