From dc2bac1b5e1145075f32f0a46b7a57f46efc5451 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 28 Jun 2009 17:07:25 -0400 Subject: [PATCH] Unit Tests - All unit tests most now clean up a residual undo.data file, so the number of tests increased, but with no benefit. --- src/TDB.h | 6 +++--- src/Task.cpp | 18 ++++-------------- src/main.h | 3 +++ src/report.cpp | 2 ++ src/tests/abbreviation.t | 5 ++++- src/tests/add.t | 5 ++++- src/tests/annotate.t | 5 ++++- src/tests/append.t | 5 ++++- src/tests/args.t | 5 ++++- src/tests/benchmark.t | 5 ++++- src/tests/bug.annotate.t | 5 ++++- src/tests/bug.annual.t | 5 ++++- src/tests/bug.concat.t | 5 ++++- src/tests/bug.hang.t | 5 ++++- src/tests/bug.period.t | 5 ++++- src/tests/bug.sort.t | 5 ++++- src/tests/bug.summary.t | 5 ++++- src/tests/cal.t | 5 ++++- src/tests/color.active.t | 5 ++++- src/tests/color.disable.t | 5 ++++- src/tests/color.due.t | 5 ++++- src/tests/color.keyword.t | 5 ++++- src/tests/color.overdue.t | 5 ++++- src/tests/color.pri.t | 5 ++++- src/tests/color.project.t | 5 ++++- src/tests/color.recurring.t | 5 ++++- src/tests/color.tag.t | 5 ++++- src/tests/color.tagged.t | 5 ++++- src/tests/completed.t | 5 ++++- src/tests/config.obsolete.t | 5 ++++- src/tests/confirmation.t | 5 ++++- src/tests/custom.columns.t | 5 ++++- src/tests/custom.recur_ind.t | 5 ++++- src/tests/custom.t | 5 ++++- src/tests/custom.tag_ind.t | 5 ++++- src/tests/dateformat.t | 5 ++++- src/tests/default.t | 5 ++++- src/tests/delete.t | 6 +++++- src/tests/due.t | 5 ++++- src/tests/duplicate.t | 5 ++++- src/tests/enpassant.t | 5 ++++- src/tests/export.t | 5 ++++- src/tests/filter.t | 5 ++++- src/tests/import.143.t | 5 ++++- src/tests/import.150.t | 5 ++++- src/tests/import.160.t | 5 ++++- src/tests/import.cmd.t | 5 ++++- src/tests/import.csv.t | 5 ++++- src/tests/import.todo.t | 5 ++++- src/tests/import.txt.t | 5 ++++- src/tests/label.t | 5 ++++- src/tests/nag.t | 5 ++++- src/tests/next.t | 5 ++++- src/tests/oldest.t | 5 ++++- src/tests/overdue.t | 5 ++++- src/tests/recur.t | 5 ++++- src/tests/recur.weekdays.t | 5 ++++- src/tests/sequence.t | 5 ++++- src/tests/shadow.t | 5 ++++- src/tests/start.t | 6 +++++- src/tests/subproject.t | 5 ++++- src/tests/substitute.t | 5 ++++- src/tests/tag.t | 5 ++++- src/tests/tdb.t.cpp | 2 ++ src/tests/undo.t | 6 +++++- src/tests/utf8.t | 5 ++++- 66 files changed, 261 insertions(+), 78 deletions(-) diff --git a/src/TDB.h b/src/TDB.h index f72defd15..b2e159d9a 100644 --- a/src/TDB.h +++ b/src/TDB.h @@ -30,9 +30,9 @@ #include #include #include -#include -#include -#include +#include "Location.h" +#include "Filter.h" +#include "Task.h" // Length of longest line. #define T_LINE_MAX 32768 diff --git a/src/Task.cpp b/src/Task.cpp index 592ef4649..99de67d17 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -538,33 +538,23 @@ void Task::validate () const if (has ("until")) { Date until (::atoi (get ("until").c_str ())); - if (due >= until) + if (due > until) throw std::string ("An 'until' date must be after a 'due' date."); // TODO i18n } Date entry (::atoi (get ("entry").c_str ())); - if (entry >= due) - throw std::string ("An 'entry' date must be before a 'due' date."); // TODO i18n - - if (has ("until")) - { - Date until (::atoi (get ("until").c_str ())); - if (entry >= until) - throw std::string ("An 'until' date must be after an 'entry' date."); // TODO i18n - } - if (has ("start")) { Date start (::atoi (get ("start").c_str ())); - if (entry >= start) + if (entry > start) throw std::string ("A 'start' date must be after an 'entry' date."); // TODO i18n } if (has ("end")) { Date end (::atoi (get ("end").c_str ())); - if (entry >= end) + if (entry > end) throw std::string ("An 'end' date must be after an 'entry' date."); // TODO i18n } } @@ -574,7 +564,7 @@ void Task::validate () const { Duration d; if (! d.valid (get ("recur"))) - throw std::string ("An 'end' date must be after an 'entry' date."); // TODO i18n + throw std::string ("A recurrence value must be valid."); // TODO i18n } } diff --git a/src/main.h b/src/main.h index 3ae62b1c5..3f6a566fc 100644 --- a/src/main.h +++ b/src/main.h @@ -24,6 +24,8 @@ // USA // //////////////////////////////////////////////////////////////////////////////// +#ifndef INCLUDED_MAIN +#define INCLUDED_MAIN #define FEATURE_TDB_OPT 1 // TDB Optimization reduces file I/O. #define FEATURE_NEW_ID 1 // Echoes back new id. @@ -154,4 +156,5 @@ template void listDiff ( } } +#endif //////////////////////////////////////////////////////////////////////////////// diff --git a/src/report.cpp b/src/report.cpp index f332e9f52..624752a97 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -1617,9 +1617,11 @@ std::string handleReportStats () if (!stat (file.c_str (), &s)) dataSize += s.st_size; +#ifdef FEADTURE_UNDO file = location + "/undo.data"; if (!stat (file.c_str (), &s)) dataSize += s.st_size; +#endif // TODO Include transaction log? diff --git a/src/tests/abbreviation.t b/src/tests/abbreviation.t index 4f798c0ee..d32c0514a 100755 --- a/src/tests/abbreviation.t +++ b/src/tests/abbreviation.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 22; +use Test::More tests => 23; # Create the rc file. if (open my $fh, '>', 'abbrev.rc') @@ -92,6 +92,9 @@ like ($output, qr/ABSOLUTELY NO WARRANTY/, 'v'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'abbrev.rc'; ok (!-r 'abbrev.rc', 'Removed abbrev.rc'); diff --git a/src/tests/add.t b/src/tests/add.t index 820b4d051..703a0249f 100755 --- a/src/tests/add.t +++ b/src/tests/add.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More tests => 15; # Create the rc file. if (open my $fh, '>', 'add.rc') @@ -70,6 +70,9 @@ like ($output, qr/Status\s+Pending\n/, 'add Pending'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'add.rc'; ok (!-r 'add.rc', 'Removed add.rc'); diff --git a/src/tests/annotate.t b/src/tests/annotate.t index bd867f8d4..209dc5ec9 100755 --- a/src/tests/annotate.t +++ b/src/tests/annotate.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'annotate.rc') @@ -67,6 +67,9 @@ like ($output, qr/2 tasks/, 'count'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'annotate.rc'; ok (!-r 'annotate.rc', 'Removed annotate.rc'); diff --git a/src/tests/append.t b/src/tests/append.t index 54225dd86..2fa921bb0 100755 --- a/src/tests/append.t +++ b/src/tests/append.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'append.rc') @@ -48,6 +48,9 @@ like ($output, qr/Description\s+foo\sbar\n/, 'append worked'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'append.rc'; ok (!-r 'append.rc', 'Removed append.rc'); diff --git a/src/tests/args.t b/src/tests/args.t index 63ad3a1ff..e47acd6b0 100755 --- a/src/tests/args.t +++ b/src/tests/args.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'args.rc') @@ -64,6 +64,9 @@ like ($output, qr/Description\s+project:p\spri:H\s\+tag\sfoo\n/ms, 'task 1 -- pr unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'args.rc'; ok (!-r 'args.rc', 'Removed args.rc'); diff --git a/src/tests/benchmark.t b/src/tests/benchmark.t index 73088a4a0..303205deb 100755 --- a/src/tests/benchmark.t +++ b/src/tests/benchmark.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'bench.rc') @@ -96,6 +96,9 @@ ok (!-r 'pending.data', 'Removed pending.data'); unlink 'completed.data'; ok (!-r 'completed.data', 'Removed completed.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'bench.rc'; ok (!-r 'bench.rc', 'Removed bench.rc'); diff --git a/src/tests/bug.annotate.t b/src/tests/bug.annotate.t index f1b20b4aa..04b4ad272 100755 --- a/src/tests/bug.annotate.t +++ b/src/tests/bug.annotate.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'bug_annotate.rc') @@ -47,6 +47,9 @@ like ($output, qr/Cannot apply a blank annotation./, 'failed on blank annotation unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'bug_annotate.rc'; ok (!-r 'bug_annotate.rc', 'Removed bug_annotate.rc'); diff --git a/src/tests/bug.annual.t b/src/tests/bug.annual.t index 9c5384d72..37abfaa10 100755 --- a/src/tests/bug.annual.t +++ b/src/tests/bug.annual.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 13; +use Test::More tests => 14; # Create the rc file. if (open my $fh, '>', 'annual.rc') @@ -72,6 +72,9 @@ like ($output, qr/11\s+1\/1\/2009\s+-\s+foo/, 'synthetic 10 no creep'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'annual.rc'; ok (!-r 'annual.rc', 'Removed annual.rc'); diff --git a/src/tests/bug.concat.t b/src/tests/bug.concat.t index d711c0df7..3d0a1f0e8 100755 --- a/src/tests/bug.concat.t +++ b/src/tests/bug.concat.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'bug_concat.rc') @@ -71,6 +71,9 @@ like ($output, qr/Description\s+aaa bbb:ccc ddd\n/, 'properly concatenated'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'bug_concat.rc'; ok (!-r 'bug_concat.rc', 'Removed bug_concat.rc'); diff --git a/src/tests/bug.hang.t b/src/tests/bug.hang.t index dbe229919..339403810 100755 --- a/src/tests/bug.hang.t +++ b/src/tests/bug.hang.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'hang.rc') @@ -76,6 +76,9 @@ ok (!-r 'shadow.txt', 'Removed shadow.txt'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'hang.rc'; ok (!-r 'hang.rc', 'Removed hang.rc'); diff --git a/src/tests/bug.period.t b/src/tests/bug.period.t index 49f95a4de..13ff94401 100755 --- a/src/tests/bug.period.t +++ b/src/tests/bug.period.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 41; +use Test::More tests => 42; # Create the rc file. if (open my $fh, '>', 'period.rc') @@ -157,6 +157,9 @@ like ($output, qr/\b2y\b/, 'verify 2y'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'period.rc'; ok (!-r 'period.rc', 'Removed period.rc'); diff --git a/src/tests/bug.sort.t b/src/tests/bug.sort.t index c1e4588f5..4623a2571 100755 --- a/src/tests/bug.sort.t +++ b/src/tests/bug.sort.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'bug_sort.rc') @@ -54,6 +54,9 @@ like ($output, qr/three.*one.*two/msi, 'list did not hang after pri:H on 1'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'bug_sort.rc'; ok (!-r 'bug_sort.rc', 'Removed bug_sort.rc'); diff --git a/src/tests/bug.summary.t b/src/tests/bug.summary.t index c98b58d03..62999a479 100755 --- a/src/tests/bug.summary.t +++ b/src/tests/bug.summary.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'summary.rc') @@ -60,6 +60,9 @@ ok (!-r 'pending.data', 'Removed pending.data'); unlink 'completed.data'; ok (!-r 'completed.data', 'Removed completed.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'summary.rc'; ok (!-r 'summary.rc', 'Removed summary.rc'); diff --git a/src/tests/cal.t b/src/tests/cal.t index 16846025f..fe1892ef6 100755 --- a/src/tests/cal.t +++ b/src/tests/cal.t @@ -30,7 +30,7 @@ use strict; use warnings; -use Test::More tests => 35; +use Test::More tests => 36; # Create the rc file. if (open my $fh, '>', 'cal.rc') @@ -111,6 +111,9 @@ unlike ($output, qr/May 2010/, 'May 2010 is not displayed'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'cal.rc'; ok (!-r 'cal.rc', 'Removed cal.rc'); diff --git a/src/tests/color.active.t b/src/tests/color.active.t index 0ad678223..190011308 100755 --- a/src/tests/color.active.t +++ b/src/tests/color.active.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -53,6 +53,9 @@ like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.active'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.disable.t b/src/tests/color.disable.t index c4a0f4a58..cf07308ef 100755 --- a/src/tests/color.disable.t +++ b/src/tests/color.disable.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -51,6 +51,9 @@ unlike ($output, qr/\033\[0m/, 'color.disable - no color reset'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.due.t b/src/tests/color.due.t index af1f0077e..463ec0159 100755 --- a/src/tests/color.due.t +++ b/src/tests/color.due.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -52,6 +52,9 @@ like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.due'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.keyword.t b/src/tests/color.keyword.t index 4e99e7400..3b25a31e6 100755 --- a/src/tests/color.keyword.t +++ b/src/tests/color.keyword.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -55,6 +55,9 @@ like ($output, qr/ \033\[32m .* green .* \033\[0m /x, 'color.keywo unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.overdue.t b/src/tests/color.overdue.t index 9555a92cd..9f7ee721c 100755 --- a/src/tests/color.overdue.t +++ b/src/tests/color.overdue.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -52,6 +52,9 @@ like ($output, qr/ \033\[31m .* red .* \033\[0m/x, 'color.overdue'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.pri.t b/src/tests/color.pri.t index 14a2ee42d..e6a8ebde3 100755 --- a/src/tests/color.pri.t +++ b/src/tests/color.pri.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 8; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -59,6 +59,9 @@ like ($output, qr/ \033\[33m .* yellow .* \033\[0m /x, 'color.pri.none'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.project.t b/src/tests/color.project.t index 2b90ec59c..702cc4523 100755 --- a/src/tests/color.project.t +++ b/src/tests/color.project.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -52,6 +52,9 @@ like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.project.re unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.recurring.t b/src/tests/color.recurring.t index 27990b1aa..437e2663b 100755 --- a/src/tests/color.recurring.t +++ b/src/tests/color.recurring.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -52,6 +52,9 @@ like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.recur unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.tag.t b/src/tests/color.tag.t index da870e39e..5540c4735 100755 --- a/src/tests/color.tag.t +++ b/src/tests/color.tag.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -55,6 +55,9 @@ like ($output, qr/ \033\[32m .* green .* \033\[0m /x, 'color.tag.green' unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/color.tagged.t b/src/tests/color.tagged.t index 947a467e9..e33c891d9 100755 --- a/src/tests/color.tagged.t +++ b/src/tests/color.tagged.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'color.rc') @@ -52,6 +52,9 @@ like ($output, qr/ \033\[31m .* red .* \033\[0m /x, 'color.tagged'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'color.rc'; ok (!-r 'color.rc', 'Removed color.rc'); diff --git a/src/tests/completed.t b/src/tests/completed.t index a53c7e652..0b02fc81b 100755 --- a/src/tests/completed.t +++ b/src/tests/completed.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'completed.rc') @@ -57,6 +57,9 @@ ok (!-r 'pending.data', 'Removed pending.data'); unlink 'completed.data'; ok (!-r 'completed.data', 'Removed completed.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'completed.rc'; ok (!-r 'completed.rc', 'Removed completed.rc'); diff --git a/src/tests/config.obsolete.t b/src/tests/config.obsolete.t index 7a5f34bc1..123bccf3d 100755 --- a/src/tests/config.obsolete.t +++ b/src/tests/config.obsolete.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'obsolete.rc') @@ -50,6 +50,9 @@ like ($output, qr/ foo\n/, 'unsupported configuration variable'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'obsolete.rc'; ok (!-r 'obsolete.rc', 'Removed obsolete.rc'); diff --git a/src/tests/confirmation.t b/src/tests/confirmation.t index 955cace13..dd9c6bc9e 100755 --- a/src/tests/confirmation.t +++ b/src/tests/confirmation.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 26; +use Test::More tests => 27; # Create the rc file. if (open my $fh, '>', 'confirm.rc') @@ -99,6 +99,9 @@ like ($output, qr/(Permanently delete task 7 'foo'\? \(y\/n\)) \1 \1/, 'confirma unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'response.txt'; ok (!-r 'response.txt', 'Removed response.txt'); diff --git a/src/tests/custom.columns.t b/src/tests/custom.columns.t index ab1927b65..c9dd4bb64 100755 --- a/src/tests/custom.columns.t +++ b/src/tests/custom.columns.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 5; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -50,6 +50,9 @@ like ($output, qr/Unrecognized column name: foo\n/, 'custom report spotted inval unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'custom.rc'; ok (!-r 'custom.rc', 'Removed custom.rc'); diff --git a/src/tests/custom.recur_ind.t b/src/tests/custom.recur_ind.t index 0c7746016..d1bf096cb 100755 --- a/src/tests/custom.recur_ind.t +++ b/src/tests/custom.recur_ind.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -54,6 +54,9 @@ unlike ($output, qr/2\s+R/, 'No recurrence indicator t2'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'custom.rc'; ok (!-r 'custom.rc', 'Removed custom.rc'); diff --git a/src/tests/custom.t b/src/tests/custom.t index 5ca345aa0..43f6b9404 100755 --- a/src/tests/custom.t +++ b/src/tests/custom.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -56,6 +56,9 @@ unlike ($output, qr/two/, 'custom filter excluded'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'custom.rc'; ok (!-r 'custom.rc', 'Removed custom.rc'); diff --git a/src/tests/custom.tag_ind.t b/src/tests/custom.tag_ind.t index 3bbfe5443..bd659eb84 100755 --- a/src/tests/custom.tag_ind.t +++ b/src/tests/custom.tag_ind.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -54,6 +54,9 @@ unlike ($output, qr/2\s+\+/, 'No tag indicator t2'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'custom.rc'; ok (!-r 'custom.rc', 'Removed custom.rc'); diff --git a/src/tests/dateformat.t b/src/tests/dateformat.t index c08cdb884..af8988de7 100755 --- a/src/tests/dateformat.t +++ b/src/tests/dateformat.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'date1.rc') @@ -62,6 +62,9 @@ like ($output, qr/\b12\/1\/09\b/, 'date format m/d/y parsed'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'date1.rc'; ok (!-r 'date1.rc', 'Removed date1.rc'); diff --git a/src/tests/default.t b/src/tests/default.t index d30a1d1d1..b80e81a0e 100755 --- a/src/tests/default.t +++ b/src/tests/default.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More tests => 17; # Create the rc file. if (open my $fh, '>', 'default.rc') @@ -76,6 +76,9 @@ like ($output, qr/1 PROJECT L .+ priority specified/, 'default command worked'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'default.rc'; ok (!-r 'default.rc', 'Removed default.rc'); diff --git a/src/tests/delete.t b/src/tests/delete.t index 35c7438b4..daaff3afd 100755 --- a/src/tests/delete.t +++ b/src/tests/delete.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 16; +use Test::More tests => 18; # Create the rc file. if (open my $fh, '>', 'undelete.rc') @@ -71,6 +71,10 @@ ok (-r 'completed.data', 'Need to remove completed.data'); unlink 'completed.data'; ok (!-r 'completed.data', 'Removed completed.data'); +ok (-r 'undo.data', 'Need to remove undo.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'undelete.rc'; ok (!-r 'undelete.rc', 'Removed undelete.rc'); diff --git a/src/tests/due.t b/src/tests/due.t index 58ecc8a30..d486a572e 100755 --- a/src/tests/due.t +++ b/src/tests/due.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'due.rc') @@ -60,6 +60,9 @@ like ($output, qr/\s+$almost\s+/, 'two not marked due'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'due.rc'; ok (!-r 'due.rc', 'Removed due.rc'); diff --git a/src/tests/duplicate.t b/src/tests/duplicate.t index d02321e86..19ea26911 100755 --- a/src/tests/duplicate.t +++ b/src/tests/duplicate.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 12; # Create the rc file. if (open my $fh, '>', 'dup.rc') @@ -59,6 +59,9 @@ like ($output, qr/Tags\s+tag/, 'duplicate added tag'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'dup.rc'; ok (!-r 'dup.rc', 'Removed dup.rc'); diff --git a/src/tests/enpassant.t b/src/tests/enpassant.t index e1f6978fe..68d715eae 100755 --- a/src/tests/enpassant.t +++ b/src/tests/enpassant.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 12; # Create the rc file. if (open my $fh, '>', 'enp.rc') @@ -57,6 +57,9 @@ like ($output, qr/Tags\s+tag/, 'en passant 2 description change'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'enp.rc'; ok (!-r 'enp.rc', 'Removed enp.rc'); diff --git a/src/tests/export.t b/src/tests/export.t index 6f540b59c..0d23d5589 100755 --- a/src/tests/export.t +++ b/src/tests/export.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 8; # Create the rc file. if (open my $fh, '>', 'export.rc') @@ -70,6 +70,9 @@ ok (!-r 'export.txt', 'Removed export.txt'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'export.rc'; ok (!-r 'export.rc', 'Removed export.rc'); diff --git a/src/tests/filter.t b/src/tests/filter.t index 64ec1314c..8deff0228 100755 --- a/src/tests/filter.t +++ b/src/tests/filter.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 129; +use Test::More tests => 130; # Create the rc file. if (open my $fh, '>', 'filter.rc') @@ -213,6 +213,9 @@ unlike ($output, qr/seven/, 'n7'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'filter.rc'; ok (!-r 'filter.rc', 'Removed filter.rc'); diff --git a/src/tests/import.143.t b/src/tests/import.143.t index 5ca5313f9..9dc392ad6 100755 --- a/src/tests/import.143.t +++ b/src/tests/import.143.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'import.rc') @@ -63,6 +63,9 @@ ok (!-r 'import.txt', 'Removed import.txt'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'import.rc'; ok (!-r 'import.rc', 'Removed import.rc'); diff --git a/src/tests/import.150.t b/src/tests/import.150.t index ec73c744e..94634fe8f 100755 --- a/src/tests/import.150.t +++ b/src/tests/import.150.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'import.rc') @@ -63,6 +63,9 @@ ok (!-r 'import.txt', 'Removed import.txt'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'import.rc'; ok (!-r 'import.rc', 'Removed import.rc'); diff --git a/src/tests/import.160.t b/src/tests/import.160.t index d787b7583..d58c68acd 100755 --- a/src/tests/import.160.t +++ b/src/tests/import.160.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'import.rc') @@ -63,6 +63,9 @@ ok (!-r 'import.txt', 'Removed import.txt'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'import.rc'; ok (!-r 'import.rc', 'Removed import.rc'); diff --git a/src/tests/import.cmd.t b/src/tests/import.cmd.t index 890a9c700..8a570e036 100755 --- a/src/tests/import.cmd.t +++ b/src/tests/import.cmd.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'import.rc') @@ -62,6 +62,9 @@ ok (!-r 'import.txt', 'Removed import.txt'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'import.rc'; ok (!-r 'import.rc', 'Removed import.rc'); diff --git a/src/tests/import.csv.t b/src/tests/import.csv.t index 6b97c17eb..34d5c4830 100755 --- a/src/tests/import.csv.t +++ b/src/tests/import.csv.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'import.rc') @@ -69,6 +69,9 @@ ok (!-r 'import.txt', 'Removed import.txt'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'import.rc'; ok (!-r 'import.rc', 'Removed import.rc'); diff --git a/src/tests/import.todo.t b/src/tests/import.todo.t index 17e52d5ed..679c6fa5e 100755 --- a/src/tests/import.todo.t +++ b/src/tests/import.todo.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 11; # Create the rc file. if (open my $fh, '>', 'import.rc') @@ -69,6 +69,9 @@ ok (!-r 'pending.data', 'Removed pending.data'); unlink 'completed.data'; ok (!-r 'completed.data', 'Removed completed.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'import.rc'; ok (!-r 'import.rc', 'Removed import.rc'); diff --git a/src/tests/import.txt.t b/src/tests/import.txt.t index 01069c6aa..0356ea637 100755 --- a/src/tests/import.txt.t +++ b/src/tests/import.txt.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'import.rc') @@ -64,6 +64,9 @@ ok (!-r 'import.txt', 'Removed import.txt'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'import.rc'; ok (!-r 'import.rc', 'Removed import.rc'); diff --git a/src/tests/label.t b/src/tests/label.t index 2f913a469..855d6249f 100755 --- a/src/tests/label.t +++ b/src/tests/label.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; # Create the rc file. if (open my $fh, '>', 'custom.rc') @@ -59,6 +59,9 @@ unlike ($output, qr/two/, 'custom filter excluded'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'custom.rc'; ok (!-r 'custom.rc', 'Removed custom.rc'); diff --git a/src/tests/nag.t b/src/tests/nag.t index 398250514..cc1442b31 100755 --- a/src/tests/nag.t +++ b/src/tests/nag.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'nag.rc') @@ -58,6 +58,9 @@ unlike (qx{../task rc:nag.rc do 1}, qr/NAG/, 'do due:yesterday -> no nag'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'nag.rc'; ok (!-r 'nag.rc', 'Removed nag.rc'); diff --git a/src/tests/next.t b/src/tests/next.t index 2130f6626..a221e56fa 100755 --- a/src/tests/next.t +++ b/src/tests/next.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'next.rc') @@ -54,6 +54,9 @@ like ($output, qr/\s3\sB\s+H\s+-\sBH\n/, 'BH shown'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'next.rc'; ok (!-r 'next.rc', 'Removed next.rc'); diff --git a/src/tests/oldest.t b/src/tests/oldest.t index 30718cec3..7b1e744e9 100755 --- a/src/tests/oldest.t +++ b/src/tests/oldest.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 55; +use Test::More tests => 56; # Create the rc file. if (open my $fh, '>', 'oldest.rc') @@ -121,6 +121,9 @@ like ($output, qr/eleven/, 'newest: eleven'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'oldest.rc'; ok (!-r 'oldest.rc', 'Removed oldest.rc'); diff --git a/src/tests/overdue.t b/src/tests/overdue.t index 94229c438..e6a36da61 100755 --- a/src/tests/overdue.t +++ b/src/tests/overdue.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'due.rc') @@ -53,6 +53,9 @@ unlike ($output, qr/three/, 'overdue: task 3 does not show up'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'due.rc'; ok (!-r 'due.rc', 'Removed due.rc'); diff --git a/src/tests/recur.t b/src/tests/recur.t index a6b014787..1bfc5ba91 100755 --- a/src/tests/recur.t +++ b/src/tests/recur.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'recur.rc') @@ -57,6 +57,9 @@ like ($output, qr/second .* third .* first/msx, 'weekly 3d daily'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'recur.rc'; ok (!-r 'recur.rc', 'Removed recur.rc'); diff --git a/src/tests/recur.weekdays.t b/src/tests/recur.weekdays.t index b2cb6baf4..b4731f55b 100755 --- a/src/tests/recur.weekdays.t +++ b/src/tests/recur.weekdays.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 8; # Create the rc file. if (open my $fh, '>', 'recur.rc') @@ -57,6 +57,9 @@ ok (!-r 'pending.data', 'Removed pending.data'); unlink 'completed.data'; ok (!-r 'completed.data', 'Removed completed.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'recur.rc'; ok (!-r 'recur.rc', 'Removed recur.rc'); diff --git a/src/tests/sequence.t b/src/tests/sequence.t index 17149fd95..fe54a797e 100755 --- a/src/tests/sequence.t +++ b/src/tests/sequence.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 27; +use Test::More tests => 28; # Create the rc file. if (open my $fh, '>', 'seq.rc') @@ -118,6 +118,9 @@ like ($output, qr/\d+\/\d+\/\d+ note/, 'sequence annotate 2'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'seq.rc'; ok (!-r 'seq.rc', 'Removed seq.rc'); diff --git a/src/tests/shadow.t b/src/tests/shadow.t index 079814657..efcb7a561 100755 --- a/src/tests/shadow.t +++ b/src/tests/shadow.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 21; +use Test::More tests => 22; # Create the rc file. if (open my $fh, '>', 'shadow.rc') @@ -75,6 +75,9 @@ ok (!-r 'pending.data', 'Removed pending.data'); unlink 'completed.data'; ok (!-r 'completed.data', 'Removed completed.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'shadow.rc'; ok (!-r 'shadow.rc', 'Removed shadow.rc'); diff --git a/src/tests/start.t b/src/tests/start.t index 20b7d92bc..4147a879a 100755 --- a/src/tests/start.t +++ b/src/tests/start.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 14; # Create the rc file. if (open my $fh, '>', 'start.rc') @@ -66,6 +66,10 @@ ok (-r 'pending.data', 'Need to remove pending.data'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +ok (-r 'undo.data', 'Need to remove undo.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'start.rc'; ok (!-r 'start.rc', 'Removed start.rc'); diff --git a/src/tests/subproject.t b/src/tests/subproject.t index 4fb46bd19..dcc1abe0b 100755 --- a/src/tests/subproject.t +++ b/src/tests/subproject.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 11; +use Test::More tests => 12; # Create the rc file. if (open my $fh, '>', 'sp.rc') @@ -66,6 +66,9 @@ like ($output, qr/No matches./, 'abc,ab,a,b | abcd -> nul'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'sp.rc'; ok (!-r 'sp.rc', 'Removed sp.rc'); diff --git a/src/tests/substitute.t b/src/tests/substitute.t index 16bb13d4d..cd685a5cc 100755 --- a/src/tests/substitute.t +++ b/src/tests/substitute.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'subst.rc') @@ -72,6 +72,9 @@ like ($output, qr/aaa ccc/, 'word deletion in description'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'subst.rc'; ok (!-r 'subst.rc', 'Removed subst.rc'); diff --git a/src/tests/tag.t b/src/tests/tag.t index f5966164f..abd2f9af0 100755 --- a/src/tests/tag.t +++ b/src/tests/tag.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; # Create the rc file. if (open my $fh, '>', 'tag.rc') @@ -66,6 +66,9 @@ unlike ($output, qr/^Tags/m, '-missing NOP'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'tag.rc'; ok (!-r 'tag.rc', 'Removed tag.rc'); diff --git a/src/tests/tdb.t.cpp b/src/tests/tdb.t.cpp index 421bf4a7a..602fc3137 100644 --- a/src/tests/tdb.t.cpp +++ b/src/tests/tdb.t.cpp @@ -53,6 +53,7 @@ int main (int argc, char** argv) // Remove any residual test file. unlink ("./pending.data"); unlink ("./completed.data"); + unlink ("./undo.data"); // Try reading an empty database. Filter filter; @@ -153,6 +154,7 @@ int main (int argc, char** argv) unlink ("./pending.data"); unlink ("./completed.data"); + unlink ("./undo.data"); return 0; } diff --git a/src/tests/undo.t b/src/tests/undo.t index 3776c2d9a..58c6970b7 100755 --- a/src/tests/undo.t +++ b/src/tests/undo.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 15; +use Test::More tests => 17; # Create the rc file. if (open my $fh, '>', 'undo.rc') @@ -68,6 +68,10 @@ ok (-r 'completed.data', 'Need to remove completed.data'); unlink 'completed.data'; ok (!-r 'completed.data', 'Removed completed.data'); +ok (-r 'undo.data', 'Need to remove undo.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'undo.rc'; ok (!-r 'undo.rc', 'Removed undo.rc'); diff --git a/src/tests/utf8.t b/src/tests/utf8.t index e3e641813..1fbfd91e5 100755 --- a/src/tests/utf8.t +++ b/src/tests/utf8.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; # Create the rc file. if (open my $fh, '>', 'utf8.rc') @@ -73,6 +73,9 @@ like ($output, qr/utf8 in tag/, 'utf8 in tag works'); unlink 'pending.data'; ok (!-r 'pending.data', 'Removed pending.data'); +unlink 'undo.data'; +ok (!-r 'undo.data', 'Removed undo.data'); + unlink 'utf8.rc'; ok (!-r 'utf8.rc', 'Removed utf8.rc');