Changeset 594


Ignore:
Timestamp:
Dec 20, 2004, 12:50:11 AM (17 years ago)
Author:
Dominic Hargreaves
Message:

Update tests so they pass without Plucene installed again (was affected by
config rejig).

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides/Test.pm

    r593 r594  
    6767                   }
    6868    );
     69
     70    eval { require CGI::Wiki::Search::Plucene; };
     71    if ( $@ ) { $config->use_plucene ( 0 ) };
     72       
    6973    return $config;
    7074}
  • trunk/t/11_utils.t

    r593 r594  
    2727    );
    2828
     29    eval { require CGI::Wiki::Search::Plucene; };
     30    if ( $@ ) { $config->use_plucene ( 0 ) };
     31
    2932    my $wiki = eval {
    3033        OpenGuides::Utils->make_wiki_object( config => $config );
  • trunk/t/14_recent_changes_cookies.t

    r593 r594  
    7171                   }
    7272    );
     73    eval { require CGI::Wiki::Search::Plucene; };
     74    if ( $@ ) { $config->use_plucene ( 0 ) };
     75   
    7376    my $guide = OpenGuides->new( config => $config );
    7477
  • trunk/t/21_rdf.t

    r593 r594  
    2626                   }
    2727    );
     28    eval { require CGI::Wiki::Search::Plucene; };
     29    if ( $@ ) { $config->use_plucene ( 0 ) };
     30
    2831
    2932    my $wiki = OpenGuides::Utils->make_wiki_object( config => $config );
  • trunk/t/31_supersearch.t

    r593 r594  
    2222    # Plucene is the recommended searcher now.
    2323    eval { require CGI::Wiki::Search::Plucene; };
    24     unless ( $@ ) {
    25         $config->use_plucene( 1 );
    26     }
     24    if ( $@ ) { $config->use_plucene( 0 ) };
    2725
    2826    my $search = OpenGuides::SuperSearch->new( config => $config );
  • trunk/t/32_supersearch_simple_metadata.t

    r593 r594  
    3131    # Plucene is the recommended searcher now.
    3232    eval { require CGI::Wiki::Search::Plucene; };
    33     unless ( $@ ) {
    34         $config->use_plucene( 1 );
    35     }
     33    if ( $@ ) { $config->use_plucene( 0 ) };
    3634
    3735    my $search = OpenGuides::SuperSearch->new( config => $config );
  • trunk/t/35_supersearch_two_searches.t

    r593 r594  
    88if ( $@ ) {
    99    plan skip_all => "DBD::SQLite not installed";
     10}
     11
     12eval { require Plucene; };
     13if ( $@ ) {
     14    plan skip_all => "Plucene not installed";
    1015}
    1116
     
    4651# Plucene is the recommended searcher now.
    4752eval { require CGI::Wiki::Search::Plucene; };
    48 unless ( $@ ) {
    49     $config->use_plucene( 1 );
    50 }
     53if ( $@ ) { $config->use_plucene( 0 ) };
    5154
    5255my $search = OpenGuides::SuperSearch->new( config => $config );
  • trunk/t/37_supersearch_summaries.t

    r593 r594  
    3030    # Plucene is the recommended searcher now.
    3131    eval { require CGI::Wiki::Search::Plucene; };
    32     unless ( $@ ) {
    33         $config->use_plucene( 1 );
    34     }
     32    if ( $@ ) { $config->use_plucene( 0 ) };
    3533
    3634    my $search = OpenGuides::SuperSearch->new( config => $config );
  • trunk/t/51_display_node.t

    r593 r594  
    2525                   }
    2626    );
     27    eval { require CGI::Wiki::Search::Plucene; };
     28    if ( $@ ) { $config->use_plucene ( 0 ) };
     29
    2730    my $guide = OpenGuides->new( config => $config );
    2831    isa_ok( $guide, "OpenGuides" );
  • trunk/t/54_redirect.t

    r593 r594  
    2424                   }
    2525    );
     26    eval { require CGI::Wiki::Search::Plucene; };
     27    if ( $@ ) { $config->use_plucene ( 0 ) };
     28           
    2629    my $guide = OpenGuides->new( config => $config );
    2730    my $wiki = $guide->wiki;
  • trunk/t/64_bug_node_history.t

    r593 r594  
    2525                   }
    2626    );
     27    eval { require CGI::Wiki::Search::Plucene; };
     28    if ( $@ ) { $config->use_plucene ( 0 ) };
    2729
    2830    my $guide = OpenGuides->new( config => $config );
  • trunk/t/65_bug_metadata_escape.t

    r593 r594  
    2424                   }
    2525    );
     26    eval { require CGI::Wiki::Search::Plucene; };
     27    if ( $@ ) { $config->use_plucene ( 0 ) };
    2628
    2729    my $guide = OpenGuides->new( config => $config );
  • trunk/t/66_bug_latlong_representation.t

    r593 r594  
    4242# Plucene is the recommended searcher now.
    4343eval { require CGI::Wiki::Search::Plucene; };
    44 unless ( $@ ) {
    45     $config->use_plucene( 1 );
    46 }
     44if ( $@ ) { $config->use_plucene( 0 ) };
    4745
    4846my $guide = OpenGuides->new( config => $config );
Note: See TracChangeset for help on using the changeset viewer.