source: mp3-find/trunk/t/02-filesystem.t @ 10

Last change on this file since 10 was 8, checked in by peter, 19 years ago

started test suite for MP3::Find::Filesystem

File size: 516 bytes
Line 
1#!/usr/bin/perl -w
2use strict;
3
4use Test::More 'no_plan'; #tests => 4;
5BEGIN { use_ok('MP3::Find::Filesystem') };
6
7my $SEARCH_DIR = 't/mp3s';
8my $MP3_COUNT = 0;
9
10# exercise the object
11
12my $finder = MP3::Find::Filesystem->new;
13isa_ok($finder, 'MP3::Find::Filesystem');
14
15# a most basic search:
16my @res = $finder->find_mp3s(dir => $SEARCH_DIR);
17is(scalar(@res), $MP3_COUNT, 'dir as scalar');
18
19@res = $finder->find_mp3s(dir => [$SEARCH_DIR]);
20is(scalar(@res), $MP3_COUNT, 'dir as ARRAY ref');
21
22#TODO: get some test mp3s
Note: See TracBrowser for help on using the repository browser.