mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Unit Tests
- Fixed broken DOM tests.
This commit is contained in:
parent
a495b05d6b
commit
e0aabe08bf
1 changed files with 8 additions and 2 deletions
10
test/dom.2.t
10
test/dom.2.t
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
## taskwarrior - a command line task list manager.
|
||||
##
|
||||
## Copyright 2006-2011, Paul Beckingham, Federico Hernandez.
|
||||
## Copyright 2006-2012, Paul Beckingham, Federico Hernandez.
|
||||
##
|
||||
## Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
## of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 3;
|
||||
use Test::More tests => 4;
|
||||
|
||||
# Create the rc file.
|
||||
if (open my $fh, '>', 'dom.rc')
|
||||
|
@ -39,11 +39,17 @@ if (open my $fh, '>', 'dom.rc')
|
|||
ok (-r 'dom.rc', 'Created dom.rc');
|
||||
}
|
||||
|
||||
# DOM reference to other task.
|
||||
qx{../src/task rc:dom.rc add one due:20110901};
|
||||
qx{../src/task rc:dom.rc add two due:1.due};
|
||||
my $output = qx{../src/task rc:dom.rc 2 info};
|
||||
like ($output, qr/Due\s+20110901/, 'Found due date duplicated via dom');
|
||||
|
||||
# DOM reference to the current task.
|
||||
qx{../src/task rc:dom.rc add three due:20110901 wait:due};
|
||||
$output = qx{../src/task rc:dom.rc 3 info};
|
||||
like ($output, qr/Waiting until\s+20110901/, 'Found wait date duplicated from due date');
|
||||
|
||||
# Cleanup.
|
||||
unlink qw(pending.data completed.data undo.data backlog.data synch.key dom.rc);
|
||||
ok (! -r 'pending.data' &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue