*** empty log message ***
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test.pm
1 # $Id: Test.pm,v 1.5 2006-10-13 10:07:36 sondberg 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 sub get_handle {
37     return $_->{'handle'};
38 }
39
40
41
42 # Utility function, really nothing to do with IRSpy
43 sub isodate {
44     my($time) = @_;
45
46     my($sec, $min, $hour, $mday, $mon, $year) = localtime($time);
47     return sprintf("%04d-%02d-%02dT%02d:%02d:%02d",
48                    $year+1900, $mon+1, $mday, $hour, $min, $sec);
49 }
50
51
52 =head1 SEE ALSO
53
54 ZOOM::IRSpy
55
56 =head1 AUTHOR
57
58 Mike Taylor, E<lt>mike@indexdata.comE<gt>
59
60 =head1 COPYRIGHT AND LICENSE
61
62 Copyright (C) 2006 by Index Data ApS.
63
64 This library is free software; you can redistribute it and/or modify
65 it under the same terms as Perl itself, either Perl version 5.8.7 or,
66 at your option, any later version of Perl 5 you may have available.
67
68 =cut
69
70 1;