Changeset 2275 in ProjectBuilder


Ignore:
Timestamp:
Aug 30, 2017, 5:07:58 PM (7 years ago)
Author:
Bruno Cornec
Message:

Fix tests so that they really work when Test::More isn't found

Location:
devel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/t/Base.t

    r1153 r2275  
    66use ProjectBuilder::Base;
    77
     8my $res;
    89eval
    910{
    1011    require Test::More;
    1112    Test::More->import();
     13    $res = $@;
    1214    my ($tmv,$tmsv) = split(/\./,$Test::More::VERSION);
    1315    if ($tmsv lt 87) {
     
    1719
    1820# Test::More appropriate version not found so no test will be performed here
    19 if ($@) {
     21if ($res) {
    2022    require Test;
    2123    Test->import();
  • devel/pb-modules/t/Conf.t

    r1905 r2275  
    44
    55use strict;
     6use ProjectBuilder::Version;
    67use ProjectBuilder::Base;
    78use ProjectBuilder::Conf;
    89use ProjectBuilder::Distribution;
    910
     11my $res;
    1012eval
    1113{
    1214    require Test::More;
    1315    Test::More->import();
     16    $res = $@;
    1417    my ($tmv,$tmsv) = split(/\./,$Test::More::VERSION);
    1518    if ($tmsv lt 87) {
     
    1922
    2023# Test::More appropriate version not found so no test will be performed here
    21 if ($@) {
     24if ($res) {
    2225    require Test;
    2326    Test->import();
  • devel/pb-modules/t/Log.t

    r1153 r2275  
    66use ProjectBuilder::Base;
    77
     8my $res;
    89eval
    910{
    1011    require Test::More;
    1112    Test::More->import();
     13    $res = $@;
    1214    my ($tmv,$tmsv) = split(/\./,$Test::More::VERSION);
    1315    if ($tmsv lt 87) {
     
    1719
    1820# Test::More not found so no test will be performed here
    19 if ($@) {
     21if ($res) {
    2022    require Test;
    2123    Test->import();
  • devel/pb/t/pb.t

    r2199 r2275  
    66use ProjectBuilder::Filter;
    77
     8my $res;
    89eval
    910{
    1011    require Test::More;
    1112    Test::More->import();
     13    $res = $@;
    1214    my ($tmv,$tmsv) = split(/\./,$Test::More::VERSION);
    1315    if ($tmsv lt 87) {
     
    1719
    1820# Test::More appropriate version not found so no test will be performed here
    19 if ($@) {
     21if ($res) {
    2022    require Test;
    2123    Test->import();
Note: See TracChangeset for help on using the changeset viewer.