add TODO test
[gitmo/Package-Stash.git] / t / 004-get.t
CommitLineData
d2d3faf4 1#!/usr/bin/env perl
2use strict;
3use warnings;
4use Test::More;
5
6use Stash::Manip;
7
8{
9 my $stash = Stash::Manip->new('Foo');
10 my $val = $stash->get_package_symbol('%foo');
11 is(ref($val), 'HASH', "got something");
12 $val->{bar} = 1;
13 is_deeply($stash->get_package_symbol('%foo'), {bar => 1},
14 "got the right variable");
15}
16
17{
18 my $stash = Stash::Manip->new('Bar');
19 my $val = $stash->get_package_symbol('@foo');
20 is(ref($val), 'ARRAY', "got something");
21 push @$val, 1;
22 is_deeply($stash->get_package_symbol('@foo'), [1],
23 "got the right variable");
24}
25
26done_testing;