Added Parson module to parse json.
[maemian] / t / parson
1 #!/usr/bin/perl
2
3 # Standard testing of the Parson package which is desinged to 
4 # receive a JSON stream and pull out date from it.
5
6 use strict;
7 use warnings;
8 use lib('/home/jeremiah/maemian/');
9 use Parson;
10 use Test::More tests => 6;
11
12 BEGIN { use_ok( 'Parson' ); }
13 require_ok( 'Parson' );
14 my $json_object = Parson->new();
15 isa_ok($json_object, 'Parson');
16 like($json_object->file, qr(\/home\/jeremiah\/maemian\/json\.txt), 'Files identical.');
17 can_ok($json_object, 'parse_json');
18 my $dsc = $json_object->parse_json();
19 like($dsc, qr(.*\.dsc$), 'Likely a dsc file');
20 print "$dsc\n";