#!/usr/bin/env perl use strict; use warnings; use utf8; use Test::More tests => 3; use Text::Dokuwiki::Parser; my $dw = Text::Dokuwiki::Parser->new; isa_ok($dw, 'Text::Dokuwiki::Parser'); my $text = "This is text with //inline **formatting**// rules [[http://site.com|and]] links."; my $tree = [ $dw->_parse_text($text) ]; is(ref $tree, 'ARRAY'); is_deeply($tree, [ 'This is text with ', [i => {}, 'inline ', [b => {}, 'formatting']], ' rules ', [a => {href => 'http://site.com'}, 'and'], ' links.', ]); exit 0;