AIE/test/test-walking.pl untested

filter: Statementstmt 0.0% 0 / 13 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 17 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl -w
2  
3 use Org::FRDCSA::Method::Walking;
4  
5 use Data::Dumper;
6  
7 # walk through all the strings simultaneously, and figure out how to resync them
8  
9 my $entries;
10 if (0) {
11 $entries =
12 [
13 "this is the first and the second",
14 "this is the second and the third",
15 "this is the third and the first",
16 ];
17 } else {
18 $entries =
19 [
20 "So Andy and Lidda went to the store, where they bought a dog.",
21 "So Kate and Eva went to the grocery, where they shopped for food.",
22 "So Mary went to the church, where she got to know God",
23 ];
24 }
25  
26 # it will walk to the point where there is the first, second and third.
27  
28 # then it will search until it finds "and the" common to all of them.
29 # Perhaps what it can do is search all combinations of lengths less
30 # than a given range and look for the shared string using LCS. once it has found a shared string, it continues on from that point
31  
32 print Dumper
33 (AIE
34 (
35 Entries => $entries,
36 ));