Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#!/usr/bin/perl -w | ||
use strict; | ||
|
||
use Test::More; | ||
|
||
# Skip if doing a regular install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,40 @@ | ||
#!/usr/bin/perl -w | ||
use strict; | ||
|
||
use Test::More; | ||
use IO::File; | ||
use Labyrinth::Plugin::Wiki; | ||
|
||
# Skip if doing a regular install | ||
plan skip_all => "Author tests not required for installation" | ||
unless ( $ENV{AUTOMATED_TESTING} ); | ||
|
||
my $changes; | ||
$changes = 'Changes' if(-f 'Changes'); | ||
$changes = 'CHANGES' if(-f 'CHANGES'); | ||
|
||
plan skip_all => 'No Changes file found' unless($changes); | ||
my $fh = IO::File->new('Changes','r') or plan skip_all => "Cannot open Changes file"; | ||
|
||
my $fh = IO::File->new($changes,'r') or plan skip_all => "Cannot open $changes file"; | ||
plan 'no_plan'; | ||
|
||
plan no_plan; | ||
use Labyrinth::Plugin::Wiki; | ||
my $version = $Labyrinth::Plugin::Wiki::VERSION; | ||
|
||
my $latest = 0; | ||
while(<$fh>) { | ||
next unless(m!^\d!); | ||
$latest = 1 if(m!^$Labyrinth::Plugin::Wiki::VERSION!); | ||
like($_, qr!\d[\d._]+\s+\d{2}/\d{2}/\d{4}!,'... version has a date'); | ||
$latest = 1 if(m!^$version!); | ||
|
||
# 2012-08-26T01:02 or 2012-08-26T01:02:03 or 2012-08-26T01:02:03.04 or 2012-08-26T01:02+01:00 | ||
|
||
like($_, qr!^ | ||
\d[\d._]+\s+ # version | ||
( \d{4}-\d{2}-\d{2} # 2012-08-26 - YYYY-MM-DD | ||
( T\d{2}:\d{2} # T01:02 - Thh:mm | ||
( :\d{2} # :02 - :ss | ||
( \.\d+ # .2 - .ss (microseconds) | ||
)? | ||
)? | ||
( (Z|[-+]\d+:\d+) # +01:00 - timezone | ||
)? | ||
)? | ||
) | ||
\s*$!x,'... version has a date'); | ||
} | ||
|
||
is($latest,1,'... latest version not listed'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters