source: ProjectBuilder/devel/pb/t/pb.t@ 2275

Last change on this file since 2275 was 2275, checked in by Bruno Cornec, 7 years ago

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

File size: 641 bytes
Line 
1#!/usr/bin/perl -w
2#
3# Tests ProjectBuilder::Base functions
4
5use strict;
6use ProjectBuilder::Filter;
7
8my $res;
9eval
10{
11 require Test::More;
12 Test::More->import();
13 $res = $@;
14 my ($tmv,$tmsv) = split(/\./,$Test::More::VERSION);
15 if ($tmsv lt 87) {
16 die "Test::More is not available in an appropriate version ($tmsv)";
17 }
18};
19
20# Test::More appropriate version not found so no test will be performed here
21if ($res) {
22 require Test;
23 Test->import();
24 plan(tests => 1);
25 print "# Faking tests as Test::More is not available in an appropriate version\n";
26 ok(1,1);
27 exit(0);
28}
29
30my $nt = 0;
31is("1", "1", "pb Fake Test");
32$nt++;
33
34done_testing($nt);
Note: See TracBrowser for help on using the repository browser.