1 # $Id: 26-packages.t,v 1.1 2005-11-08 15:56:05 mike Exp $
3 # Before `make install' is performed this script should be runnable with
4 # `make test'. After `make install' it should work as `perl 26-packages.t'
8 use Test::More tests => 6;
10 BEGIN { use_ok('ZOOM') };
12 my $host = "indexdata.com/gils";
14 eval { $conn = new ZOOM::Connection($host, 0) };
15 ok(!$@, "connection to '$host'");
17 my $p = $conn->package();
18 # Inspection of the ZOOM-C code shows that this can never fail, in fact.
19 ok(defined $p, "created package");
21 # There may be useful options to set, but this is not one of them!
22 $p->option(foo => "bar");
23 my $val = $p->option("foo");
24 ok($val eq "bar", "package option retrieved as expected");
26 eval { $p->send("foo") };
27 ok(!$@, "sent 'foo' package");
32 ok(1, "destroyed package");