I'm adding some tests to Test::HTML::Lint, and one of the things that I
want to check for is that "html_ok(undef)" fails.  Remember that
html_ok() is a T::B-based module.

The best I've got so far is this:

--cut--
use Test::More tests => 4;
use Test::HTML::Lint;

BEGIN { use_ok( 'Test::HTML::Lint' ); }

my $chunk = "<P>This is a fine chunk of code</P>";

TODO: { # undef should fail
    local $TODO = "This test should NOT succeed";
    html_ok( undef );
}

html_ok( '' );  # Blank is OK
html_ok( $chunk );
--cut--

I see two problems with this approach:  

* It's not really a TODO item. 

* If html_ok(undef) unexpectedly succeeds, the results aren't really
obvious:

t/00.load...........................ok
t/01.coverage.......................ok
t/10.test-html-lint.................ok
        1/4 unexpectedly succeeded
t/11.test-html-lint-overload........ok

In this case, "unexpectedly succeeded" really means "html_ok is broken".
:-(

Thoughts?

Thanks,
xoxo,
Andy

-- 
'Andy Lester        [EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy              parsley.org/quinn   Jk'=~/.+/s;print((split//,$&)
                            [unpack'C*',"n2]3%+>\"34.'%&.'^%4+!o.'"])

Reply via email to