Changeset 1305

Show
Ignore:
Timestamp:
08/14/06 10:36:18
Author:
miyagawa
Message:

Added $BaseDirURI to deal with multibyte directory names and "use utf8" in *.t Fixes #370

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/t/TestPlagger.pm

    r1302 r1305  
    44use File::Spec; 
    55use Test::Base -Base; 
     6use URI::Escape (); 
    67use Plagger; 
    78 
     
    1011                 slurp_file file_contains file_doesnt_contain); 
    1112 
    12 our $BaseDir
     13our($BaseDir, $BaseDirURI)
    1314{ 
    1415    my @path = File::Spec->splitdir($FindBin::Bin); 
     
    1617        if ($dir eq 't') { 
    1718            $BaseDir = File::Spec->catfile(@path); 
     19            $BaseDirURI = join "/", map URI::Escape::uri_escape($_), @path; 
    1820            last; 
    1921        } 
    2022    } 
    21     $BaseDir =~ s{\\}{/}g; # always use forward slash even on Win32 
    2223} 
    2324 
  • trunk/plagger/t/plugins/Filter-BreakEntriesToFeeds/break.t

    r1293 r1305  
    1313    config: 
    1414      feed: 
    15         - file://$t::TestPlagger::BaseDir/t/samples/rss-full.xml 
    16         - file://$t::TestPlagger::BaseDir/t/samples/atom-category.xml 
     15        - file://$t::TestPlagger::BaseDirURI/t/samples/rss-full.xml 
     16        - file://$t::TestPlagger::BaseDirURI/t/samples/atom-category.xml 
    1717  - module: Filter::BreakEntriesToFeeds 
    1818--- expected 
     
    3131    config: 
    3232      feed: 
    33         - file://$t::TestPlagger::BaseDir/t/samples/rss-full.xml 
    34         - file://$t::TestPlagger::BaseDir/t/samples/atom-category.xml 
     33        - file://$t::TestPlagger::BaseDirURI/t/samples/rss-full.xml 
     34        - file://$t::TestPlagger::BaseDirURI/t/samples/atom-category.xml 
    3535  - module: Filter::BreakEntriesToFeeds 
    3636    config: 
     
    4848    config: 
    4949      feed: 
    50         - file://$t::TestPlagger::BaseDir/t/samples/rss-full.xml 
    51         - file://$t::TestPlagger::BaseDir/t/samples/atom-category.xml 
     50        - file://$t::TestPlagger::BaseDirURI/t/samples/rss-full.xml 
     51        - file://$t::TestPlagger::BaseDirURI/t/samples/atom-category.xml 
    5252  - module: Filter::BreakEntriesToFeeds 
    5353    rule: 
  • trunk/plagger/t/regression/atom1-category.t

    r1266 r1305  
    1616    config: 
    1717      feed: 
    18         - file://$t::TestPlagger::BaseDir/t/samples/atom-category.xml 
     18        - file://$t::TestPlagger::BaseDirURI/t/samples/atom-category.xml 
    1919--- expected 
    2020is_deeply scalar $context->update->feeds->[0]->entries->[0]->tags, [ 'Catalyst' ]; 
  • trunk/plagger/t/regression/rss2-category.t

    r1241 r1305  
    1616    config: 
    1717      feed: 
    18         - file://$t::TestPlagger::BaseDir/t/samples/rss2sample.xml 
     18        - file://$t::TestPlagger::BaseDirURI/t/samples/rss2sample.xml 
    1919--- expected 
    2020is $context->update->feeds->[0]->entries->[0]->tags->[0], 'News';