Last change
on this file since 11 was
8,
checked in by peter, 19 years ago
|
started test suite for MP3::Find::Filesystem
|
File size:
516 bytes
|
Rev | Line | |
---|
[8] | 1 | #!/usr/bin/perl -w |
---|
| 2 | use strict; |
---|
| 3 | |
---|
| 4 | use Test::More 'no_plan'; #tests => 4; |
---|
| 5 | BEGIN { use_ok('MP3::Find::Filesystem') }; |
---|
| 6 | |
---|
| 7 | my $SEARCH_DIR = 't/mp3s'; |
---|
| 8 | my $MP3_COUNT = 0; |
---|
| 9 | |
---|
| 10 | # exercise the object |
---|
| 11 | |
---|
| 12 | my $finder = MP3::Find::Filesystem->new; |
---|
| 13 | isa_ok($finder, 'MP3::Find::Filesystem'); |
---|
| 14 | |
---|
| 15 | # a most basic search: |
---|
| 16 | my @res = $finder->find_mp3s(dir => $SEARCH_DIR); |
---|
| 17 | is(scalar(@res), $MP3_COUNT, 'dir as scalar'); |
---|
| 18 | |
---|
| 19 | @res = $finder->find_mp3s(dir => [$SEARCH_DIR]); |
---|
| 20 | is(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.