fwknop/perl/FKO/t/00_init.t
Damien Stuart 58c1a85711 Added perl module code to the repository.
git-svn-id: file:///home/mbr/svn/fwknop/trunk@81 510a4753-2344-4c79-9c09-4d669213fbeb
2009-04-18 13:47:09 +00:00

49 lines
1.0 KiB
Perl

##############################################################################
#
# File: 00_init.t
#
# Author: Damien S. Stuart <dstuart@dstuart.org>
#
# Purpose: Test suite file for FKO perl module init functionality.
#
##############################################################################
#
use Test::More tests => 6;
# 1 - Use test.
#
BEGIN { use_ok('FKO') };
# Test support vars
#
my $test_spa_data = '/6jQlii54itZX2d7uQb0CzKgBEKk9T9dOD5COpZM6tdL7I95+GXvbjBgCoDObwTpBSWGEPPEpLmiVIe0iQoEMRT4bDWindoHopxggByzr3aOToQZAhBgEIsMfC+ucz6sragIieQORkmr3OjtOAHI1hZjSMXadiXKo';
my $test_spa_data_pw = 'sdf';
##############################################################################
# 2 - Require test
require_ok( FKO );
# 3 - Init empty
#
my $f1 = FKO->new();
isa_ok( $f1, 'FKO' );
# 4 - Destroy empty
#
$f1->destroy();
ok(!defined($f1->{_ctx}));
# 5 - Init with data
#
my $f2 = FKO->new($test_spa_data, $test_spa_data_pw);
isa_ok( $f2, 'FKO' );
# 6 - Destroy full
#
$f2->destroy();
ok(!defined($f2->{_ctx}));
###EOF###