CIGAR format
[text-levenshtein-edlib.git] / t / Text-Levenshtein-Edlib.t
index ddd487c887f340737f73bef79ef8e8550970c0b3..1cb186aba8fbccdd15e268c618534327040b061d 100644 (file)
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 9;
+use Test::More tests => 11;
 BEGIN { use_ok('Text::Levenshtein::Edlib', ':all') };
 
 
@@ -36,3 +36,9 @@ is $r->{alphabetLength}, 7, 'align->{alphabetLength}';
 is_deeply $r->{endLocations}, [6], 'align->{endLocations}';
 is_deeply $r->{startLocations}, [0], 'align->{startLocations}';
 is_deeply $r->{alignment}, [3, 0, 0, 0, 3, 0, 2], 'align->{alignment}';
+
+my $cigar;
+$cigar = to_cigar $r->{alignment};
+is $cigar, '6M1D', 'to_cigar';
+$cigar = to_cigar $r->{alignment}, EDLIB_CIGAR_EXTENDED;
+is $cigar, '1X3=1X1=1D', 'to_cigar (extended)';
This page took 0.009701 seconds and 4 git commands to generate.