#!/usr/bin/perl package bookfinder; use Test::More tests=>4; use strict; use warnings; require "index.cgi"; is(0, scalar get_book(), "0 books in the beginning"); my @books = qw ( lang/aa.chm lang/bb.pdf misc/cc.txt ); find_book() for @books; my @two_books_found = get_book(); is(scalar @two_books_found, 2, "2 books found"); is($two_books_found[0], qq{lang/aa.chm}, "The first book name"); is($two_books_found[1], qq{lang/bb.pdf}, "The second book name");