TAPx::Parser plans

Ovid on 2006-09-18T08:29:34

Various notes for those who are curious. Please remember that the parser is still alpha software! I have no plans to label it beta until such time that I know all core features are added. With luck, they'll be working, too.

Feedback appreciated.

  • Rename all boolean methods with 'is_'.

    I've done this in my local repository and have deprecated the original method names. They will now issue a warning but will not be removed until 1.00. For example:

    if ( $test->passed ) { ... }

    Has become:

    if ( $test->is_ok ) { ... }

    We still have two boolean methods which don't begin with 'is_'. $test->has_todo and $test->has_skip. I don't feel entirely comfortable with this.

  • Write TAPx::Harness.

    This should now be relatively straightforward. You'll still have plenty of control over the output merely by passing in callbacks to override default behavior.

  • Make it work on older versions.

    Much work has already been done in this regard.

  • Make tprove offer almost identical functionality and output as prove.

    I plan to add support for reading a .tproverc.

    Aside from duplicating the current behavior, I also plan to some new switches:

    • -c. --color Run tests with colored output.

      By default, if Term::ANSIColor is installed, will show failing tests in red. Controllable via .tproverc.

    • -f, --failures Only show failing tests.
    • -m, --match Only tests which match the --match regex will be run.

      This might seem odd, but more than once I've found it useful if I want to run, for example, my 'customer' tests.

  • Find people with VMS or MacPerl who are willing to test the parser.

    Currently, I'm pretty sure I'll get test failures on both. I initially tried to cargo-cult in the code from Test::Harness, but since I couldn't reliably test it, I stopped.


Find people with VMS or MacPerl who are willing to

link on 2006-09-18T12:48:21

Windows doesn't look too happy with the latest version.

29 of 1098 tests fail. All the failed tests are in t/10-regression.t and seem to involve calling exit on an undefined value at Parser.pm line 276. I'd guess it is a problem with TAPx::Parser::Source::Perl::get_stream but I'll take more of a look when I get home this evening.

Re:Find people with VMS or MacPerl who are willing

Ovid on 2006-09-18T12:58:48

Ah, thank you. I wish I had a Windows box at home to test this on. Unfortunately, since I don't, I'm kinda stuck. I should really write a Test::Trace module (I've been meaning to) which when run, loads Devel::Trace so that you can redirect all output to a file and mail it off to the developer.

If you can provide a patch, that would be helpful, but I do realize that might be more work than you're prepared for right now. So far everything runs fine on Ubuntu and OS X :(

Re:Find people with VMS or MacPerl who are willing

Ovid on 2006-09-18T13:09:54

You know, with only 29 tests failing, I suspect this one might be an easy fix. That's roughly the number of tests associated with a 'no output' type of sample test (might be no output, might be segfault, etc). That means there's probably only one little bug in the way of it passing. If you could send me the test output at ovid at cpan, I should be able to at least quickly figure out which test file is failing.

Naming again

Aristotle on 2006-09-18T13:04:35

We still have two boolean methods which don't begin with 'is_'. $test->has_todo and $test->has_skip. I don't feel entirely comfortable with this.

Boolean methods starting with has_ are OK in my book. (So are ones starting with does_ or can_. Any name is fine that spells a question.)