projects
/
irspy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added.
[irspy-moved-to-github.git]
/
lib
/
ZOOM
/
IRSpy
/
Test.pm
diff --git
a/lib/ZOOM/IRSpy/Test.pm
b/lib/ZOOM/IRSpy/Test.pm
index
d306b29
..
7cd0a18
100644
(file)
--- a/
lib/ZOOM/IRSpy/Test.pm
+++ b/
lib/ZOOM/IRSpy/Test.pm
@@
-1,4
+1,4
@@
-# $Id: Test.pm,v 1.1 2006-06-20 16:32:42 mike Exp $
+# $Id: Test.pm,v 1.6 2006-10-13 10:08:57 sondberg Exp $
package ZOOM::IRSpy::Test;
package ZOOM::IRSpy::Test;
@@
-6,53
+6,41
@@
use 5.008;
use strict;
use warnings;
use strict;
use warnings;
+use Exporter 'import';
+our @EXPORT = qw(isodate);
+
=head1 NAME
ZOOM::IRSpy::Test - base class for tests in IRSpy
=head1 SYNOPSIS
=head1 NAME
ZOOM::IRSpy::Test - base class for tests in IRSpy
=head1 SYNOPSIS
- ### To follow
+ ## To follow
=head1 DESCRIPTION
=head1 DESCRIPTION
-I<### To follow>
+I<## To follow>
=cut
=cut
-sub new {
- my $class = shift();
- my($irspy) = @_;
-
- return bless {
- irspy => $irspy,
- }, $class;
-}
+sub subtests { () }
+sub start {
+ my $class = shift();
+ my($conn) = @_;
-sub irspy {
- my $this = shift();
- return $this->{irspy};
+ die "can't start the base-class test";
}
}
-sub run {
- my $this = shift();
- die "can't run the base-class test";
-}
-
-### Could include loop detection
-sub run_tests {
- my $this = shift();
- my @tname = @_;
- my $res = 0;
- foreach my $tname (@tname) {
- my $sub = $this->irspy()->_run_test($tname);
- $res = $sub if $sub > $res;
- }
+# Utility function, really nothing to do with IRSpy
+sub isodate {
+ my($time) = @_;
- return $res;
+ my($sec, $min, $hour, $mday, $mon, $year) = localtime($time);
+ return sprintf("%04d-%02d-%02dT%02d:%02d:%02d",
+ $year+1900, $mon+1, $mday, $hour, $min, $sec);
}
}