83ad68678e5e364e98830297b7878ef586e9e105
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test.pm
1 # $Id: Test.pm,v 1.4 2006-10-06 11:33:07 mike Exp $
2
3 package ZOOM::IRSpy::Test;
4
5 use 5.008;
6 use strict;
7 use warnings;
8
9 use Exporter 'import';
10 our @EXPORT = qw(isodate);
11
12 =head1 NAME
13
14 ZOOM::IRSpy::Test - base class for tests in IRSpy
15
16 =head1 SYNOPSIS
17
18  ## To follow
19
20 =head1 DESCRIPTION
21
22 I<## To follow>
23
24 =cut
25
26 sub subtests { () }
27
28 sub start {
29     my $class = shift();
30     my($conn) = @_;
31
32     die "can't start the base-class test";
33 }
34
35
36 # Utility function, really nothing to do with IRSpy
37 sub isodate {
38     my($time) = @_;
39
40     my($sec, $min, $hour, $mday, $mon, $year) = localtime($time);
41     return sprintf("%04d-%02d-%02dT%02d:%02d:%02d",
42                    $year+1900, $mon+1, $mday, $hour, $min, $sec);
43 }
44
45
46 =head1 SEE ALSO
47
48 ZOOM::IRSpy
49
50 =head1 AUTHOR
51
52 Mike Taylor, E<lt>mike@indexdata.comE<gt>
53
54 =head1 COPYRIGHT AND LICENSE
55
56 Copyright (C) 2006 by Index Data ApS.
57
58 This library is free software; you can redistribute it and/or modify
59 it under the same terms as Perl itself, either Perl version 5.8.7 or,
60 at your option, any later version of Perl 5 you may have available.
61
62 =cut
63
64 1;