diff options
author | Francois Marier <francois@debian.org> | 2008-06-23 23:47:09 +1200 |
---|---|---|
committer | Francois Marier <francois@debian.org> | 2008-06-23 23:47:09 +1200 |
commit | 42280f662d3ce4affb00eb68a22a081dfb951395 (patch) | |
tree | 6fc148a570675adc70504d610cb2552b4ab3545e /t/00_files.t |
Imported Upstream version 0.2.1upstream/0.2.1
Diffstat (limited to 't/00_files.t')
-rw-r--r-- | t/00_files.t | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/00_files.t b/t/00_files.t new file mode 100644 index 0000000..b000c56 --- /dev/null +++ b/t/00_files.t @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use Test::More qw(no_plan); +use Data::Dumper; +use CIL::Utils; + +my $parsed_fields = CIL::Utils->parse_cil_file( 't/i_cafebabe.cil', 'Description' ); + +my $correct_fields = { + 'Summary' => 'Addition of a \'attach\' command', + 'Status' => 'New', + 'CreatedBy' => 'A N Other <a.n.other@example.org>', + 'AssignedTo' => 'A Name <aname@example.com>', + 'Label' => [ + 'against-v0.1', + 'priority-medium', + 'type-enhancement', + ], + 'Inserted' => '2008-06-15 18:22:01', + 'Updated' => '2008-06-15 23:15:27', + 'Description' => '\'cil\' currently has no way of adding attachments to issues. + +This should be added so that the actual data cil stores is complete.' +}; + +is_deeply($parsed_fields, $correct_fields, 'Check parsing of file'); + +CIL::Utils->write_cil_file( '/tmp/i_deadbeef.cil', $correct_fields, qw(Summary Status CreatedBy AssignedTo Label Inserted Updated Description) ); +CIL::Utils->write_cil_file( '/tmp/i_decaf7ea.cil', $parsed_fields, qw(Summary Status CreatedBy AssignedTo Label Inserted Updated Description) ); + +# is($parsed_fields, $correct_fields, 'Check parsing of file'); |