# $Id: 04-context-lines.t,v 1.3 2000/12/18 04:59:12 knok Exp $
#

use strict;
use Test;

BEGIN { plan tests => 3 }

use Search::Saryer;
my $file = 't/01-new-destroy.t';
my $searchstr = 'sary';
my $exct = 4;

print STDERR "\nCreate suffix array\n";
system("mksary $file");
print STDERR "Create Saryer object.\n";
my $x = Search::Saryer::new('filename' => $file);
ok(defined $x);

$x->search($searchstr);
ok(1);
$x->sort_occurrences();

my $ret = $x->get_next_context_lines(2, 2);
if (defined $x) {
	print STDERR "-- get_next_context_lines: \n";
	print STDERR "$ret";
	print STDERR "-- \n";
	ok(1);
} else {
	ok(0);
}
