File: 1basic.t

package info (click to toggle)
libalgorithm-annotate-perl 0.10-1.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 40 kB
  • ctags: 9
  • sloc: perl: 65; makefile: 42
file content (15 lines) | stat: -rw-r--r-- 416 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl

use Test::More qw(no_plan);
use strict;
BEGIN {
use_ok 'Algorithm::Annotate';
}

my $ann = Algorithm::Annotate->new();

$ann->init ('a', [qw/a b c d g g g h h i f/]);
$ann->add  ('b', [qw/a b c d e f g g h h i j k/]);
ok(eq_array($ann->result, [qw/a a a a b b a a a a a b b/]));
$ann->add  ('c', [qw/c b c d f g g c c c h h i j k/]);
ok(eq_array($ann->result, [qw/c a a a b a a c c c a a a b b/]));