Changeset 12 in mp3-find for trunk/t


Ignore:
Timestamp:
02/14/06 20:19:23 (18 years ago)
Author:
peter
Message:
  • added "exclude_path" option to Filesystem backend
  • added an excluded directory to the test suite ("t/dont_look_here")
  • fixed dying DB test (still a workaround for a DBD::SQLite problem)
Location:
trunk/t
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/02-filesystem.t

    r8 r12  
    22use strict; 
    33 
    4 use Test::More 'no_plan'; #tests => 4; 
     4use Test::More tests => 6; 
    55BEGIN { use_ok('MP3::Find::Filesystem') }; 
    66 
    77my $SEARCH_DIR = 't/mp3s'; 
    8 my $MP3_COUNT = 0; 
     8my $EXCLUDE_DIR = 't/mp3s/dont_look_here'; 
     9my $MP3_COUNT = 1; 
     10my $EXCLUDED_MP3_COUNT = 1; 
    911 
    1012# exercise the object 
     
    2022is(scalar(@res), $MP3_COUNT, 'dir as ARRAY ref'); 
    2123 
     24# exclude 
     25@res = $finder->find_mp3s(dir => $SEARCH_DIR, exclude_path => $EXCLUDE_DIR); 
     26is(scalar(@res), $MP3_COUNT - $EXCLUDED_MP3_COUNT, 'excluded directory'); 
     27 
     28@res = $finder->find_mp3s(dir => $SEARCH_DIR, exclude_path => [$EXCLUDE_DIR]); 
     29is(scalar(@res), $MP3_COUNT - $EXCLUDED_MP3_COUNT, 'excluded directory as array'); 
     30 
    2231#TODO: get some test mp3s 
  • trunk/t/03-db.t

    r10 r12  
    1919my $SEARCH_DIR = 't/mp3s'; 
    2020my $DB_FILE = 't/mp3.db'; 
    21 my $MP3_COUNT = 0; 
     21my $MP3_COUNT = 1; 
    2222 
    2323# exercise the object 
Note: See TracChangeset for help on using the changeset viewer.