Skip to content

Commit

Permalink
Build results of f65e609 (on master)
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Jul 10, 2015
1 parent ac1e3e9 commit c5711e0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Revision history for Asset-Pack

0.000001 2015-07-10T08:41:47Z c00264c
0.000001 2015-07-10T08:48:52Z f65e609
- Initial release.
14 changes: 14 additions & 0 deletions t/internals/pack_metadata.t
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,18 @@ subtest "simple metadata + self-mixed variables w/ cycle" => sub {

} or diag $last_pack;

subtest "simple metadata + hash variable" => sub {
my $struct = { VERSION => '1.0', myhash => { happy => 1 } };

my $ref = mk_pack( pack_metadata( $struct, [qw( %myhash )] ) );
note explain $ref;
my (@expected) = ( 'VERSION', 'meta', '%myhash' );
eq_or_diff( [ sort keys %{$ref} ], [ sort @expected ], 'Only expected vars' );
is_deeply( $ref->{meta}->{PACKER}, $packer_struct, 'PACKER is expected' );
is_deeply( $ref->{meta}->{myhash}, { happy => 1 }, 'myhash expected' );

eq_or_diff( $ref->{'%myhash'}, { happy => 1 }, '%myhash is expected structure' );

} or diag $last_pack;

done_testing;

0 comments on commit c5711e0

Please sign in to comment.