NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Emacs toggle-test-plan (Score:1)
Have some Elisp code.
Re:Emacs toggle-test-plan (Score:1)
Re:Emacs toggle-test-plan (Score:2)
Hey, that looks awesome (no surprise that someone interested in Prolog would have Lisp skills, I suppose).
I've been thinking about creating several vim tools specifically dedicated to making tests easier to write and maintain. Would you be interested in converting them to eLisp?
Re:Emacs toggle-test-plan (Score:1)
So what helpers do y
Re:Emacs toggle-test-plan (Score:2)
There are a few features I'm thinking about.
Obviously I have 1 and 2 working. Number 3 requires a planned feature for Test::Class that lets you run a single test method. I've submitted a patch, but it wasn't as clean as Adrian would have liked and was not incorporated (I'm disappointed, but agree).
I'd also like TogglePlan to work with Test::Class and that shouldn't be too hard, but I've not written the code for it yet.
The ,gt and ,gm functions are tough. They require a bit of discipline on the part of developers in how they want to lay out their code so that one can find the appropriate test and/or implementation in a deterministic fashion. If the user has a non-standard layout, it would require that they set some variables in their .vimrc file to let PerlTests.vim know how to find things. Also, while this is fairly easy for Test::Class, I think special comments would be necessary in modules and tests if just using regular Test::More style scripts. I'm thinking something like this:
And in the test:
If that worked, you could easily pop back and forth between your test and its implementation with very little work.
For Test::Class, you would specify test package identifier (typically 'TEST' or 'Test') and whether it's prefix, postfix, or infix. Here are the allowed styles:
In your .vimrc, you would then set:
There's a reason why 'infix' is there, but it's a long story dealing with a company I used to work for. I doubt I'd actually include that.
Reply to This
Parent
Re:Emacs toggle-test-plan (Score:2)
Ooh, and along with the regular documentation, it would be nice to include something like Ian Langworth's testing quick reference card [langworth.com] information. I'm unsure of the syntax, but if someone new to testing wants a quick refresher of how to use Test::More, they could type something like:
And get short output like what's on the card. Still, I don't like that syntax.
Re:Emacs toggle-test-plan (Score:1)