Changeset 1324


Ignore:
Timestamp:
Apr 5, 2012, 9:04:20 AM (10 years ago)
Author:
bob
Message:

now we require all 3 Geo Modules we should no longer skip tests if any of them are missing.

Location:
branches/rel_0_66/t
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/rel_0_66/t/25_write_geo_data.t

    r1306 r1324  
    1515if ( $@ ) {
    1616    plan skip_all => "Plucene not installed";
    17 }
    18 
    19 # Strictly speaking we don't need to skip _all_ tests if we don't have
    20 # the modules below.  Revisit this when not in a hurry.
    21 # We only actually need the former two for the National Grid tests and the
    22 # latter for the UTM tests.
    23 eval { require Geo::Coordinates::OSGB; };
    24 if ( $@ ) {
    25     plan skip_all => "Geo::Coordinates::OSGB not installed";
    26 }
    27 
    28 eval { require Geo::Coordinates::ITM; };
    29 if ( $@ ) {
    30     plan skip_all => "Geo::Coordinates::ITM not installed";
    31 }
    32 
    33 eval { require Geo::Coordinates::UTM; };
    34 if ( $@ ) {
    35     plan skip_all => "Geo::Coordinates::UTM not installed";
    3617}
    3718
  • branches/rel_0_66/t/26_geo_data_search_form.t

    r1306 r1324  
    1919if ( $@ ) {
    2020    plan skip_all => "Test::HTML::Content not installed";
    21 }
    22 
    23 # Strictly speaking we don't need to skip _all_ tests if we don't have
    24 # the modules below.  Revisit this when not in a hurry.
    25 # We only actually need the former two for the National Grid tests and the
    26 # latter for the UTM tests.
    27 eval { require Geo::Coordinates::OSGB; };
    28 if ( $@ ) {
    29     plan skip_all => "Geo::Coordinates::OSGB not installed";
    30 }
    31 
    32 eval { require Geo::Coordinates::ITM; };
    33 if ( $@ ) {
    34     plan skip_all => "Geo::Coordinates::ITM not installed";
    35 }
    36 
    37 eval { require Geo::Coordinates::UTM; };
    38 if ( $@ ) {
    39     plan skip_all => "Geo::Coordinates::UTM not installed";
    4021}
    4122
  • branches/rel_0_66/t/27_geo_data_edit_form.t

    r1306 r1324  
    1919if ( $@ ) {
    2020    plan skip_all => "Test::HTML::Content not installed";
    21 }
    22 
    23 # Strictly speaking we don't need to skip _all_ tests if we don't have
    24 # the modules below.  Revisit this when not in a hurry.
    25 # We only actually need the former two for the National Grid tests and the
    26 # latter for the UTM tests.
    27 eval { require Geo::Coordinates::OSGB; };
    28 if ( $@ ) {
    29     plan skip_all => "Geo::Coordinates::OSGB not installed";
    30 }
    31 
    32 eval { require Geo::Coordinates::ITM; };
    33 if ( $@ ) {
    34     plan skip_all => "Geo::Coordinates::ITM not installed";
    35 }
    36 
    37 eval { require Geo::Coordinates::UTM; };
    38 if ( $@ ) {
    39     plan skip_all => "Geo::Coordinates::UTM not installed";
    4021}
    4122
  • branches/rel_0_66/t/33_search_advanced_search.t

    r1306 r1324  
    1818}
    1919
    20 eval { require Geo::Coordinates::OSGB; };
    21 if ( $@ ) {
    22     plan skip_all => "Geo::Coordinates::OSGB not installed";
    23 }
    2420
    2521plan tests => 8;
  • branches/rel_0_66/t/33_search_advanced_search_utm.t

    r1273 r1324  
    1515if ( $@ ) {
    1616    plan skip_all => "Plucene not installed";
    17 }
    18 
    19 eval { require Geo::Coordinates::UTM; };
    20 if ( $@ ) {
    21     plan skip_all => "Geo::Coordinates::UTM not installed";
    2217}
    2318
  • branches/rel_0_66/t/34_search_paging.t

    r1316 r1324  
    2929
    3030# Test with OS co-ords.
    31 eval { require Geo::Coordinates::OSGB; };
    32 SKIP: {
    33     skip "Geo::Coordinates::OSGB not installed", 6 if $@;
    3431    $config->geo_handler( 1 );
    3532
     
    6562    like( $output, qr/search.cgi\?.*os_dist=1500.*Previous.*results/s,
    6663          "os_dist retained in previous page link" );
    67 }
    6864
    6965# Test with OSIE co-ords.
    70 eval { require Geo::Coordinates::ITM; };
    71 SKIP: {
    72     skip "Geo::Coordinates::ITM not installed", 6 if $@;
    7366
    7467    # We must create a new search object after changing the geo_handler
     
    107100    like( $output, qr/search.cgi\?.*osie_dist=1500.*Previous.*results/s,
    108101          "osie_dist retained in previous page link" );
    109 }
    110102
    111103# Test with UTM.
    112 eval { require Geo::Coordinates::UTM; };
    113 SKIP: {
    114     skip "Geo::Coordinates::UTM not installed", 6 if $@;
    115104
    116105    # We must create a new search object after changing the geo_handler
     
    149138    like( $output, qr/search.cgi\?.*latlong_dist=1500.*Previous.*results/s,
    150139          "latlong_dist retained in previous page link" );
    151 }
  • branches/rel_0_66/t/35_search_two_searches.t

    r1306 r1324  
    1717}
    1818
    19 # Strictly speaking we don't need to skip _all_ tests if we don't have
    20 # the modules below.  Revisit this when not in a hurry.
    21 # We only actually need the former two for the National Grid tests and the
    22 # latter for the UTM tests.
    23 eval { require Geo::Coordinates::OSGB; };
    24 if ( $@ ) {
    25     plan skip_all => "Geo::Coordinates::OSGB not installed";
    26 }
    27 
    28 eval { require Geo::Coordinates::ITM; };
    29 if ( $@ ) {
    30     plan skip_all => "Geo::Coordinates::ITM not installed";
    31 }
    32 
    33 eval { require Geo::Coordinates::UTM; };
    34 if ( $@ ) {
    35     plan skip_all => "Geo::Coordinates::UTM not installed";
    36 }
    3719
    3820plan tests => 10;
  • branches/rel_0_66/t/38_search_params.t

    r1306 r1324  
    1616if ( $@ ) {
    1717    plan skip_all => "Plucene not installed";
    18 }
    19 
    20 # Strictly speaking we don't need to skip _all_ tests if we don't have
    21 # the modules below.  Revisit this when not in a hurry.
    22 # We only actually need the former two for the National Grid tests and the
    23 # latter for the UTM tests.
    24 eval { require Geo::Coordinates::OSGB; };
    25 if ( $@ ) {
    26     plan skip_all => "Geo::Coordinates::OSGB not installed";
    27 }
    28 
    29 eval { require Geo::Coordinates::ITM; };
    30 if ( $@ ) {
    31     plan skip_all => "Geo::Coordinates::ITM not installed";
    32 }
    33 
    34 eval { require Geo::Coordinates::UTM; };
    35 if ( $@ ) {
    36     plan skip_all => "Geo::Coordinates::UTM not installed";
    3718}
    3819
  • branches/rel_0_66/t/39_search_form.t

    r1306 r1324  
    1919if ( $@ ) {
    2020    plan skip_all => "Test::HTML::Content not installed";
    21 }
    22 
    23 # Strictly speaking we don't need to skip _all_ tests if we don't have
    24 # the modules below.  Revisit this when not in a hurry.
    25 # We only actually need the former two for the National Grid tests and the
    26 # latter for the UTM tests.
    27 eval { require Geo::Coordinates::OSGB; };
    28 if ( $@ ) {
    29     plan skip_all => "Geo::Coordinates::OSGB not installed";
    30 }
    31 
    32 eval { require Geo::Coordinates::ITM; };
    33 if ( $@ ) {
    34     plan skip_all => "Geo::Coordinates::ITM not installed";
    35 }
    36 
    37 eval { require Geo::Coordinates::UTM; };
    38 if ( $@ ) {
    39     plan skip_all => "Geo::Coordinates::UTM not installed";
    4021}
    4122
  • branches/rel_0_66/t/62_bug_trailing_whitespace.t

    r1306 r1324  
    2222my $guide = OpenGuides->new( config => $config );
    2323
    24 SKIP: {
    25     eval { require Geo::Coordinates::OSGB; };
    26     skip "Geo::Coordinates::OSGB not installed", 2 if $@;
    27 
    2824    my $q = CGI->new( "" );
    2925    $q->param( -name => "os_x", -value => " 123456 " );
     
    4137        "leading and trailing spaces stripped from os_x when processed" );
    4238    is( $metadata_vars{os_y}, "654321", "...and os_y" );
    43 }
    4439
    45 SKIP: {
    46     eval { require Geo::Coordinates::ITM; };
    47     skip "Geo::Coordinates::ITM not installed", 2 if $@;
     40
    4841
    4942    $config->geo_handler( 2 );
     
    6356        "leading and trailing spaces stripped from osie_x when processed" );
    6457    is( $metadata_vars{osie_y}, "200000", "...and osie_y" );
    65 }
    66 
    67 SKIP: {
    68     eval { require Geo::Coordinates::UTM; };
    69     skip "Geo::Coordinates::UTM not installed", 2 if $@;
    7058
    7159    $config->geo_handler( 3 );
     
    8573        "leading and trailing spaces stripped from latitude when processed" );
    8674    is( $metadata_vars{longitude}, "-0.215293", "...and longitude" );
    87 }
    8875
    8976OpenGuides::Test->write_data(
  • branches/rel_0_66/t/66_bug_latlong_representation.t

    r1273 r1324  
    1414}
    1515
    16 eval { require Geo::Coordinates::UTM; };
    17 if ( $@ ) {
    18     plan skip_all => "Geo::Coordinates::UTM not installed";
    19 }
    2016
    2117plan tests => 4;
  • branches/rel_0_66/t/69_bug_zero_geo.t

    r1322 r1324  
    5151is( @{$details{metadata}->{os_x}}[0], 0, "Zero os_x saved" );
    5252is( @{$details{metadata}->{os_y}}[0], 0, "Zero os_y saved" );
    53 SKIP: {
    54         eval { require Geo::Coordinates::ITM; };
    55         skip "Geo::Coordinates::ITM is not installed", 2 if $@;
     53
    5654$config->{geo_handler} = 2;
    5755
     
    7775is( @{$details{metadata}->{osie_x}}[0], 0, "Zero osie_x saved" );
    7876is( @{$details{metadata}->{osie_y}}[0], 0, "Zero osie_y saved" );
    79 }
    8077$config->{geo_handler} = 3;
    8178
Note: See TracChangeset for help on using the changeset viewer.