App-Music-ChordPro
view release on metacpan or search on metacpan
t/020_markup.t view on Meta::CPAN
#!/usr/bin/perl
# https://github.com/ChordPro/chordpro/issues/111
use strict;
use warnings;
use utf8;
use ChordPro::Testing;
use ChordPro::Output::PDF;
plan tests => 2;
*defrag = \&ChordPro::Output::PDF::Song::defrag;
my $res;
$res = defrag( [ "<i>Cominâ for to carry me ", "home.</i>" ] );
my $xp = [ "<i>Cominâ for to carry me </i>", "<i>home.</i>" ];
is_deeply( $res, $xp, "defrag1");
$res = defrag( [ "<i>Cominâ for to <b>carry me ", "home.</b></i>" ] );
$xp = [ "<i>Cominâ for to <b>carry me </b></i>", "<i><b>home.</b></i>" ];
is_deeply( $res, $xp, "defrag2");
( run in 0.957 second using v1.01-cache-2.11-cpan-b16cb0d3907 )