1 |
#!/usr/bin/perl |
2 |
|
3 |
use warnings; |
4 |
use strict; |
5 |
use autodie; |
6 |
|
7 |
use Test::More tests => 8; |
8 |
use Data::Dump qw/dump/; |
9 |
|
10 |
use_ok 'html'; |
11 |
|
12 |
ok( my $html = html::table( 2, qw/a1 a2 b1 b2 c1 c2/ ), 'table' ); |
13 |
diag $html; |
14 |
|
15 |
ok( $html = html::table( -3, qw/h1 h2 h3 a1 a2 a3 b1 b2 b3/ ), 'table' ); |
16 |
diag $html; |
17 |
|
18 |
ok( $html = html::select( 'dropdown', 2, 1, 2, 3 ), 'select' ); |
19 |
diag $html; |
20 |
|
21 |
ok( $html = html::pre_dump( foo => 1, bar => 'baz' ), 'pre_dump' ); |
22 |
diag $html; |
23 |
|
24 |
ok( $html = html::conf( '127.0.0.1', { foo => 1, bar => 'baz' } ), 'conf' ); |
25 |
diag $html; |
26 |
|
27 |
ok( my @t = html::conf( '127.0.0.1', { foo => 1, bar => 'baz' }, 'table' ), 'conf table' ); |
28 |
diag dump @t; |
29 |
|
30 |
ok( @t = html::conf( '127.0.0.1', { foo => 1, bar => 'baz' }, 'edit', 'foo' ), 'conf edit' ); |
31 |
diag dump @t; |