#=============================================================================== # # DESCRIPTION: Test I<> implementation # # AUTHOR: Aliaksandr P. Zahatski, #=============================================================================== #$Id$ package T::FormattingCode::X; use strict; use warnings; use Test::More; use Data::Dumper; use base 'TBase'; sub x0000_process_index_string : Test(4) { my $t = shift; my $str = "hash"; my @r1 = &Perl6::Pod::FormattingCode::X::process_index( undef, $str ); is_deeply \@r1, [ 'hash', ['hash'] ], 'X'; $str = "scalar|variables"; my @r2 = &Perl6::Pod::FormattingCode::X::process_index( undef, $str ); is_deeply \@r2, [ 'scalar', ['variables'] ], "X<$str>"; $str = "scalar|variables, definition of"; my @r3 = &Perl6::Pod::FormattingCode::X::process_index( undef, $str ); is_deeply \@r3, [ 'scalar', ['variables, definition of'] ], "X<$str>"; $str = "hash|hashes, definition of; associative arrays"; my @r4 = &Perl6::Pod::FormattingCode::X::process_index( undef, $str ); is_deeply \@r4, [ 'hash', [ 'hashes, definition of', 'associative arrays' ] ], "X<$str>"; } sub x001_xml : Test { my $t = shift; my $x = $t->parse_to_xml( < test X< scalar | variable > test X< scalar | variable , define of; array> test X< | variable , define of; array> =end pod T $t->is_deeply_xml( $x, q%test variabletest scalartest scalartest % ); } sub x002_xhml : Test { my $t = shift; my $x = $t->parse_to_xhtml( < test X< scalar | variable > test X< scalar | variable , define of; array> =end pod T $t->is_deeply_xml( $x, q#

test variable test scalar test scalar

# ); } sub x003_docbook : Test { my $t = shift; my $x = $t->parse_to_docbook( < test X< scalar | variable > test X< scalar | variable , define of; array> test1 X<| variable , define of; array> =end pod T $t->is_deeply_xml( $x, q#test variablevariable test scalarvariable test scalarvariabledefine ofarray test1 variabledefine ofarray # ); } 1;