--- /dev/null
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use Data::Dumper;
+
+plan tests => 5;
+
+use_ok('Parse::Binary::Nested');
+
+my $example = Parse::Binary::Nested->new([
+ foos => [
+ 'C',
+ message => 'Z*',
+ period => 'C',
+ ],
+ trail => 'a*',
+]);
+ok($example, 'example parser');
+my $data = $example->unpackf("\2foo\0!\0.rest");
+is(ref $data, 'HASH', 'output structure');
+is($data->{foos}->[1]->{period}, ord '.', 'sample element');
+
+is_deeply(
+ Parse::Binary::Nested->new(
+ [ lstr => 'Ca3', rest => 'a*' ]
+ )->unpackf("\2quux"),
+ { lstr => 'qu', rest => 'x' },
+ 'length string'
+);
+