Update of /cvsroot/http-webtest/HTTP-WebTest-Plugin-DateTest/lib/HTTP/WebTest/Plugin
In directory sc8-pr-cvs1:/tmp/cvs-serv21188/lib/HTTP/WebTest/Plugin
Modified Files:
DateTest.pm
Log Message:
Preparation for release, more test cases
Index: DateTest.pm
===================================================================
RCS file: /cvsroot/http-webtest/HTTP-WebTest-Plugin-DateTest/lib/HTTP/WebTest/Plugin/DateTest.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** DateTest.pm 30 Dec 2002 17:22:19 -0000 1.4
--- DateTest.pm 31 Dec 2002 15:46:12 -0000 1.5
***************
*** 7,11 ****
use vars qw($VERSION);
! $VERSION = '0.99';
=head1 NAME
--- 7,11 ----
use vars qw($VERSION);
! $VERSION = '1.00';
=head1 NAME
***************
*** 15,24 ****
=head1 VERSION
! Version 0.99 - $Revision$
! Pre release for WebTest 2.00
=head1 SYNOPSIS
! Not Applicable
--- 15,24 ----
=head1 VERSION
! Version 1.00 - $Revision$
! Compatible with L<HTTP::WebTest|HTTP::WebTest> 2.00
=head1 SYNOPSIS
! Not Applicable - see HTTP::WEBTEST
***************
*** 30,35 ****
There is limited support for other locales for which a
C<Date::Language::*> module exist.
! The C<Date::Languge> and C<Date::Parse> modules are
! part of the L<Time::Date> distribution, available from a
CPAN near you.
--- 30,35 ----
There is limited support for other locales for which a
C<Date::Language::*> module exist.
! The C<Date::Languge> and L<Date::Parse|Date::Parse> modules are
! part of the C<TimeDate> distribution, available from a
CPAN near you.
***************
*** 45,49 ****
Text string which marks the start of a date string
in the returned page.
! The date string should look like anything that L<Date::Parse> is
able to understand.
Leading/trailing whitespace is no problem
--- 45,49 ----
Text string which marks the start of a date string
in the returned page.
! The date string should look like anything that L<Date::Parse|Date::Parse> is
able to understand.
Leading/trailing whitespace is no problem
***************
*** 53,57 ****
Text string which marks the end of a date string
in the returned page.
! The date string should look like anything that L<Date::Parse> is
able to understand.
Leading/trailing whitespace is no problem
--- 53,57 ----
Text string which marks the end of a date string
in the returned page.
! The date string should look like anything that L<Date::Parse|Date::Parse> is
able to understand.
Leading/trailing whitespace is no problem
***************
*** 85,89 ****
Specify the language in which the date string is written.
Locales are taken from C<Date::Language::(Locale)> modules (part
! of L<Date::Parse>). The value of C<date_locale> is normalized to
Capitalized notation, so this parameter is not case sensitive.
--- 85,89 ----
Specify the language in which the date string is written.
Locales are taken from C<Date::Language::(Locale)> modules (part
! of L<Date::Parse|Date::Parse>). The value of C<date_locale> is normalized to
Capitalized notation, so this parameter is not case sensitive.
***************
*** 155,159 ****
if ($content =~ /\Q$start\E\s*(.+?)\s*\Q$end\E/) {
$datestr = $1;
! $pgdate = _str2time_locale($datestr, $locale);
}
my $age = ($pgdate) ? $now - $pgdate : 'unknown';
--- 155,159 ----
if ($content =~ /\Q$start\E\s*(.+?)\s*\Q$end\E/) {
$datestr = $1;
! $pgdate = &_str2time_locale($datestr, $locale);
}
my $age = ($pgdate) ? $now - $pgdate : 'unknown';
***************
*** 163,172 ****
push @results,
$self->test_result($ok,
! sprintf("%s %s %s (%s > %s)", $start, $datestr, $end, &_seconds2str($age, $units), $maxage)
);
}
push @ret, ['Max. age of date string', @results] if @results;
-
return @ret;
}
--- 163,172 ----
push @results,
$self->test_result($ok,
! sprintf("Wanted max %s and got %s (%s)",
! $maxage, &_seconds2str($age, $units), $datestr)
);
}
push @ret, ['Max. age of date string', @results] if @results;
return @ret;
}
***************
*** 202,206 ****
my ($date, $units) = @_;
if (&TIMETAB($units)) {
! return sprintf("%4.2f %s", $date/&TIMETAB($units), $units);
}
my $str = '';
--- 202,207 ----
my ($date, $units) = @_;
if (&TIMETAB($units)) {
! return ($units eq 's') ? "$date s"
! : sprintf("%4.2f %s", $date/&TIMETAB($units), $units);
}
my $str = '';
***************
*** 275,287 ****
=head1 SEE ALSO
! L<Date::Parse>
! L<HTTP::WebTest>
! L<HTTP::WebTest::API>
! L<HTTP::WebTest::Plugin>
! L<HTTP::WebTest::Plugins>
=cut
--- 276,288 ----
=head1 SEE ALSO
! L<Date::Parse|Date::Parse>
! L<HTTP::WebTest|HTTP::WebTest>
! L<HTTP::WebTest::API|HTTP::WebTest::API>
! L<HTTP::WebTest::Plugin|HTTP::WebTest::Plugin>
! L<HTTP::WebTest::Plugins|HTTP::WebTest::Plugins>
=cut
|