File: lists.t

package info (click to toggle)
libtext-wikiformat-perl 0.81-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 240 kB
  • sloc: perl: 1,218; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!perl

use strict;
use warnings;

use Test::More tests => 5;

use_ok( 'Text::WikiFormat' ) or exit;
ok( exists $Text::WikiFormat::tags{ blockorder },
	'TWF should have a blockorder entry in %tags' );

# isan ARRAY
isa_ok( $Text::WikiFormat::tags{ blockorder }, 'ARRAY', '... and we hope it' );

like( join(' ', @{ $Text::WikiFormat::tags{ blockorder } }),
	qr/ordered.+ordered.+code/,
	'... and code should come after ordered and unordered' );

my $wikitext =<<END_HERE;
	* first list item
	* second list item
END_HERE

my $htmltext = Text::WikiFormat::format( $wikitext );

like( $htmltext, qr!<li>first list item!,
	'lists should be able to start on the first line of text' );