Skip to content

Commit

Permalink
Item12701: Dependency tests fail due to rev change.
Browse files Browse the repository at this point in the history
SimiliesPlugin version changed away from a date based RELEASE, and the
unit test for that now fails.   Convert the test to a test specific
module.

git-svn-id: http://svn.foswiki.org/trunk@17581 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
GeorgeClark authored and GeorgeClark committed Apr 24, 2014
1 parent 46d5880 commit 3e09288
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
@@ -0,0 +1,9 @@
package Foswiki::Contrib::UnitTestContrib::DateBasedRelease;

# This module exists only to provide a module with version number
# that includes multiple dots, for the purposes of unit-testing
# extender.pl
our $VERSION = '2.00';
our $RELEASE = '05 Oct 2012';

1;
Expand Up @@ -2,6 +2,7 @@ bin/test 0755
data/System/UnitTestContrib.txt 0644
lib/Foswiki/Contrib/UnitTestContrib.pm 0644
lib/Foswiki/Contrib/UnitTestContrib/Config.spec 0644
lib/Foswiki/Contrib/UnitTestContrib/DateBasedRelease.pm 0644
lib/Foswiki/Contrib/UnitTestContrib/LastResortWontLoad.pm 0644
lib/Foswiki/Contrib/UnitTestContrib/MissingDependency.pm 0644
lib/Foswiki/Contrib/UnitTestContrib/MultiDottedVersion.pm 0644
Expand Down
5 changes: 3 additions & 2 deletions UnitTestContrib/test/unit/DependencyTests.pm
Expand Up @@ -190,13 +190,14 @@ sub test_check_dep_version_with_rev {
# 1, Foswiki::Contrib::JSCalendarContrib v1234 installed
my $dep = new Foswiki::Configure::Dependency(
type => "perl",
module => "Foswiki::Plugins::SmiliesPlugin",
module => "Foswiki::Contrib::UnitTestContrib::DateBasedRelease",
version => ">=20 Sep 2009"
);
my ( $ok, $message ) = $dep->check();
$this->assert_equals( 1, $ok, $message );
$this->assert_matches(
qr/Foswiki::Plugins::SmiliesPlugin version .* installed/, $message );
qr/Foswiki::Contrib::UnitTestContrib::DateBasedRelease .* installed/,
$message );
$this->assert( $message =~ /version (\d+) /, $message );
my $revision = $1;
$this->assert( $revision ne '999999' );
Expand Down

0 comments on commit 3e09288

Please sign in to comment.