a301f80c39282ff19dc06ac03f4a6cf000cba3a5
[debian/amanda] / installcheck / Amanda_Types.pl
1 # Copyright (c) 2006 Zmanda Inc.  All Rights Reserved.
2 #
3 # This program is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU General Public License version 2 as published
5 # by the Free Software Foundation.
6 #
7 # This program is distributed in the hope that it will be useful, but
8 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
9 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
10 # for more details.
11 #
12 # You should have received a copy of the GNU General Public License along
13 # with this program; if not, write to the Free Software Foundation, Inc.,
14 # 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 #
16 # Contact information: Zmanda Inc, 505 N Mathlida Ave, Suite 120
17 # Sunnyvale, CA 94085, USA, or: http://www.zmanda.com
18
19 use Test::More qw(no_plan);
20 use Amconfig;
21 use strict;
22
23 use lib "@amperldir@";
24 use Amanda::Types;
25
26 # Not much to test, but we can at least exercise the constructor and destructor,
27 # and the SWIG getters and setters:
28 ok(my $df = Amanda::Types::dumpfile_t->new(), "can create a dumpfile_t");
29 is($df->{'datestamp'}, '', "newly created dumpfile_t has empty datestamp");
30 ok($df->{'name'} = "myhost", "can write to a string in the header");
31 is($df->{'name'}, "myhost", "..and get it back");