Export YAML

- Implemented export-yaml.pl as a filter.
- Reimplemented export.yaml.t to use the filter.
This commit is contained in:
Paul Beckingham 2011-08-31 23:52:07 -04:00
parent 5f4571b0d0
commit c1a21ce5a4
2 changed files with 9 additions and 15 deletions

View file

@ -28,7 +28,7 @@
use strict;
use warnings;
use Test::More tests => 21;
use Test::More tests => 20;
# Create the rc file.
if (open my $fh, '>', 'export.rc')
@ -42,11 +42,8 @@ if (open my $fh, '>', 'export.rc')
# Add two tasks, export, examine result.
qx{../src/task rc:export.rc add priority:H project:A one};
qx{../src/task rc:export.rc add +tag1 +tag2 two};
my $output = qx{env PATH=../src task rc:export.rc _version};
like ($output, qr/^[a-z0-9]{7}$/, 'found task via env');
qx{env PATH=../src:$ENV{PATH} ../scripts/add-ons/export-yaml.pl rc:export.rc > ./export.txt};
my $output = qx{../src/task rc:export.rc export | ../scripts/add-ons/export-yaml.pl > ./export.txt};
my @lines;
if (open my $fh, '<', './export.txt')
{