Algorithm-Diff-Apply

 view release on metacpan or  search on metacpan

t/80optsimple.t  view on Meta::CPAN


# The blocks remaining after this optimisation can still conflict with
# other diffs - and when optimise_remove_duplicates() optimises a
# bunch of identical hunks from different tagged sequences, the
# remaining hunk is kept under the first tag.

my $derived2 = [qw{a b c d e f 1 2 3 h i j k l m n o p q}];
my $changes2 = diff($original, $derived2);
$result   = join(':', apply_diffs($original, {optimisers => TEST_OPTIMISERS},
				  '_03_third' => $changes2,
				  '_02_second' => $changes,  # }__ identical
				  '_01_first' => $changes,   # }
				  ));
ok($result =~ />>>/);
ok($result =~ />>>\s+_01_first/);
ok($result !~ />>>\s+_02_second/);
ok($result =~ />>>\s+_03_third/);



( run in 1.364 second using v1.01-cache-2.11-cpan-39bf76dae61 )