mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-03 08:58:34 +02:00
Bug Fix - export
- Fixed export bug that was emitting quoted blank strings, instead of blank strings. - Fixed undo.t unit tests.
This commit is contained in:
parent
456a493ab5
commit
cea84b3d3b
4 changed files with 49 additions and 19 deletions
|
@ -46,13 +46,18 @@ qx{../task rc:export.rc export > ./export.txt};
|
|||
my @lines;
|
||||
if (open my $fh, '<', './export.txt')
|
||||
{
|
||||
@lines = <$fh>;
|
||||
while (my $line = <$fh>)
|
||||
{
|
||||
next unless $line =~ /^['0-9]/;
|
||||
push @lines, $line;
|
||||
}
|
||||
|
||||
close $fh;
|
||||
}
|
||||
|
||||
my $line1 = qr/'id','uuid','status','tags','entry','start','due','recur','end','project','priority','fg','bg','description'\n/;
|
||||
my $line2 = qr/'.{8}-.{4}-.{4}-.{4}-.{12}','pending','',\d+,,,,,'A','H',,,'one'\n/;
|
||||
my $line3 = qr/'.{8}-.{4}-.{4}-.{4}-.{12}','pending','tag1 tag2',\d+,,,,,,,,,'two'\n/;
|
||||
my $line2 = qr/1,'.{8}-.{4}-.{4}-.{4}-.{12}','pending','',\d+,,,,,'A','H',,,'one'\n/;
|
||||
my $line3 = qr/2,'.{8}-.{4}-.{4}-.{4}-.{12}','pending','tag1 tag2',\d+,,,,,,,,,'two'\n/;
|
||||
|
||||
like ($lines[0], $line1, "export line one");
|
||||
like ($lines[1], $line2, "export line two");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue