use strict; BEGIN { $^W = 1; use vars qw(@tests); @tests = ( [ 'empty', q{}, q{} ], [ 'space', q{ }, q{ } ], [ 'plain', q{hello mum}, q{hello mum} ], [ 'plain nl', qq{hello mum\n}, "hello mum\n" ], [ 'nonprint', qq{foo\0bar}, "foo bar" ], [ 'p tag', qq{

hello mum\n}, "

hello mum\n

" ], [ 'i tag', qq{hello mum\n}, "hello mum\n" ], [ 'valid p', q{

valid p

}, q{

valid p

} ], [ 'misplaced tr', q{misplaced }, q{misplaced } ], [ 'misplaced td', q{misplaced }, q{misplaced } ], [ 'misplaced li', q{misplaced
  • }, q{misplaced } ], [ 'misplaced cdata', q{misplaced cdata
    hello}, q{
    misplaced cdatahello} ], [ 'pass emtpy img', q{}, q{} ], [ 'block img src', q{}, q{} ], [ 'block a href', q{x}, q{x} ], [ 'block a mailto', q{x}, q{x} ], [ 'unknown tag', q{}, q{} ], [ 'unknown attr', q{}, q{} ], [ 'misplaced close', q{}, q{} ], [ 'br', q{
    hello
    }, q{
    hello} ], [ 'hr width', q{x
    y}, q{x
    y} ], [ 'hr width dq', q{x
    y}, q{x
    y} ], [ 'hr width sq', q{x
    y}, q{x
    y} ], [ 'hr silly width', q{x
    y}, q{x
    y} ], [ 'hr silly width dq', q{x
    y}, q{x
    y} ], [ 'hr silly width sq', q{x
    y}, q{x
    y} ], [ 'bad trailing /', q{hello}, q{hello} ], [ 'good trailing /', q{
    }, q{
    } ], [ 'interleave', q{ghE}, q{ghE} ], [ 'interleave case', q{ghE}, q{ghE} ], [ 'interleave open', q{ghE}, q{ghE} ], [ 'p close order', q{

    one

    two

    three}, q{

    one

    two

    three

    } ], [ 'p/li close order', q{
    • 1

    • 2

    }, q{
    • 1

    • 2

    }, ], [ 'p/li left open', q{
    • 1

    • 2}, q{

      • 1

      • 2

      }, ], [ 'italic p', q{foo

      bar}, q{foo

      bar

      } ], [ 'misplaced close', q{foo
      }, q{foo} ], # [ 'lonley <', q{<}, q{<} ], [ 'lonley >', q{>}, q{>} ], [ 'lonley "', q{"}, q{"} ], [ 'lonley &', q{&}, q{&} ], [ 'valid entity', q{<}, q{<} ], [ 'uppercase entity', q{Þ}, q{Þ} ], [ 'valid numeric ent', q{{}, '{' ], [ 'valid hex entity', q{k}, q{k} ], [ 'unicode numeric', q{ಂ}, q{ಂ} ], [ 'unicode hex lc', q{뾔}, q{뾔} ], [ 'unicode hex uc', q{뾔}, q{뾔} ], [ 'unknown entity', q{&foo;}, q{&foo;} ], [ 'nasty entity', q{ &{foo}; }, q{ &{foo}; } ], [ 'minus entity', q{&foo-foo;}, q{&foo-foo;} ], [ 'underscore entity', q{&foo_foo;}, q{&foo_foo;} ], [ 'overlong entity', q{&littlesquigglethingwithalinethroughit;}, q{&littlesquigglethingwithalinethroughit;} ], [ 'overlong hex', q{�}, q{&#x7FB20A4E;} ], [ 'overlong decimal', q{�}, q{&#349850348;} ], [ '-ve decimal', q{&#-7;}, q{&#-7;} ], [ '+ve decimal', q{&#+7;}, q{&#+7;} ], [ 'invalid numeric', q{&#o777;}, q{&#o777;} ], [ '<