Changeset 1106 in ProjectBuilder for devel/pb-modules/t


Ignore:
Timestamp:
Nov 14, 2010, 5:31:51 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Avoids to force a dep on Test::More. Just use Test and a fake test if Test::More is not available.
Location:
devel/pb-modules/t
Files:
2 edited

Legend:

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

    r1077 r1106  
    44
    55use strict;
    6 use Test::More;
    76use ProjectBuilder::Base;
     7use Test;
     8
     9eval
     10{
     11  require Test::More;
     12  Test::More->import();
     13};
     14
     15# Test::More not found so no test will be performed here
     16if ($@) {
     17    BEGIN { plan tests => 1 };
     18    print "# Faking tests as test::More is not available\n";
     19    ok(1,1);
     20    exit (0);
     21}
    822
    923my $nt = 0;
  • devel/pb-modules/t/Log.t

    r1090 r1106  
    44
    55use strict;
    6 use Test::More;
    76use ProjectBuilder::Base;
     7use Test;
     8
     9eval
     10{
     11  require Test::More;
     12  Test::More->import();
     13};
     14
     15# Test::More not found so no test will be performed here
     16if ($@) {
     17    BEGIN { plan tests => 1 };
     18    print "# Faking tests as test::More is not available\n";
     19    ok(1,1);
     20    exit (0);
     21}
    822
    923is("tmp", "tmp", "temp test");
Note: See TracChangeset for help on using the changeset viewer.