#!/usr/bin/perl package bookfinder; use Test::More tests=>6; use strict; use warnings; require "index.cgi"; my @empty = get_search_history(undef, undef); is(scalar @empty, 0, "empty search history"); my @one = get_search_history(undef, [qw(one)]); is(scalar @one, 1, "one history item"); is($one[0], "one", "item is one"); my @two = get_search_history("two", ["one"]); is(scalar @two, 2, "two history items"); is($two[0], "one", "The first item is one"); is($two[1], "two", "The second item is two");