Commit graph

515 commits

Author SHA1 Message Date
Paul Beckingham
0fe5887af8 Unit Tests
- Change #819 test to pass, because the bug is deferred.
- Change #884 test to pass, because the bug is deferred.
- Added Najmi Ahmad Zabidi to AUTHORS file, for suggesting a specific
  verbosity control.
- Added some stealth unit tests.
2012-02-26 17:56:15 -05:00
Paul Beckingham
824cba7152 Bugs #552, #863
- Fixed bug #552, where 'rc.verbose=off' suppressed warnings (thanks to Peter
  De Poorter).
- Fixed bug #863, which suppressed report labels with rc.verbose=off (thanks to
  Michelle Crane).
2012-02-26 17:01:13 -05:00
Paul Beckingham
5b3cba2e70 Unit Tests
- Enabled more recurring task tests.
2012-02-26 14:57:21 -05:00
Paul Beckingham
bcf416e71f Unit Tests
- Added tests for #884.
2012-02-26 14:38:48 -05:00
Paul Beckingham
ceabcdd6c3 Unit Tests
- Reduced complexity in the test.
2012-02-26 14:37:01 -05:00
Paul Beckingham
5396c718ef Unit Tests
- Added test to illustrate the workaround.
2012-02-26 14:02:40 -05:00
Paul Beckingham
1f5146e7a0 Unit Tests
- Corrected test count and removed diag output.
2012-02-26 13:39:55 -05:00
Paul Beckingham
3133616b67 Unit tests
- Enabled some disabled regex filter tests.
2012-02-26 10:57:59 -05:00
Owen Clarke
7c2d97d939 Unit Tests
- Fixed 'witching hour' bug in unit tests that causes problems when run
  in assorted time zones.  By using str2time to get the epoch value of
  a known local time, this should fix failures that occur.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-25 23:13:41 -05:00
Owen Clarke
049f34d339 Portability
- Improved run_all script to run on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-25 23:10:11 -05:00
Paul Beckingham
e0aabe08bf Unit Tests
- Fixed broken DOM tests.
2012-02-24 18:26:35 -05:00
Owen Clarke
8e5afa0d8a Bug #936
- Fixed failing tests on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-23 20:16:39 -05:00
Owen Clarke
ed6bdd7bdc Bug #936
- Fixed failing tests on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-23 20:13:44 -05:00
Owen Clarke
3b9a737ac4 Bug #936
- Fixed failing tests on Solaris.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-02-23 19:58:42 -05:00
Paul Beckingham
15a0d7a801 Bug #880
- Fixed bug #880, which listed the wrong file paths for themes (thanks to Peter
  Lewis).
2012-02-23 17:26:52 -05:00
Paul Beckingham
39998d5cc5 Bug #932
- Fixed bug #932, which fixed change propagation for recurring tasks (thanks to
  Jennifer Cormier).
- Added unit tests, corrected some.
2012-02-20 17:25:31 -05:00
Paul Beckingham
9f8165e3c6 Bug #932 (part 1)
- Fixed bug that caused only parent recurring tasks to have their attributes
  properly removed.
- When duplicating a parent recurring task, a new recurring parent task is
  created.  When a child recurring task is duplicated, a plain task is created.
- Added unit tests.
- Thanks to Jennifer Cormier.
2012-02-20 01:10:42 -05:00
Paul Beckingham
7a45db4d0f Feature #891
- Added feature #891, which allows for leftmost partial matches of UUID values.
  Makes direct comparisons for full-length values, and regular expressions for
  partial values.  Note that there is a minimum length of 8 hex digits.
- Added safety parsing mechanism that fails a partial UUID if immediately
  followed by a hex digit.  This allows for numbers longer than 8 digits to not
  be misinterpreted as a UUID.
- Implemented Nibbler::getPartialUUID.
- Implemented unit tests.
@@ -1145,12 +1145,23 @@ const A3 A3::sequence (const A3& input) const

   for (unsigned int i = 0; i < uuids.size (); ++i)
   {
-    if (ids.size ())
+    if (ids.size () + i > 0)
       sequenced.push_back (Arg ("or", Arg::cat_op));

-    sequenced.push_back (Arg ("uuid",        Arg::type_string, Arg::cat_dom));
-    sequenced.push_back (Arg ("=",                             Arg::cat_op));
-    sequenced.push_back (Arg (uuids[i],      Arg::type_string, Arg::cat_literal));
+    // A full-length UUID requires a string comparison.
+    if (uuids[i].length () == 36)
+    {
+      sequenced.push_back (Arg ("uuid",         Arg::type_string, Arg::cat_dom));
+      sequenced.push_back (Arg ("=",                              Arg::cat_op));
+      sequenced.push_back (Arg (uuids[i],       Arg::type_string, Arg::cat_literal));
+    }
+    // A UUID fragment is a leftmost comparison.
+    else
+    {
+      sequenced.push_back (Arg ("uuid",         Arg::type_string, Arg::cat_dom));
+      sequenced.push_back (Arg ("~",                              Arg::cat_op));
+      sequenced.push_back (Arg ("^" + uuids[i], Arg::type_string, Arg::cat_rx));
+    }
   }

   sequenced.push_back (Arg (")", Arg::cat_op));
@@ -1674,11 +1685,11 @@ bool A3::is_uuid (Nibbler& n, std::string& result)
   n.save ();
   result = "";
   std::string uuid;
-  if (n.getUUID (uuid))
+  if (n.getPartialUUID (uuid))
   {
     result += uuid;
     while (n.skip (',') &&
-           n.getUUID (uuid))
+           n.getPartialUUID (uuid))
     {
       result += ',' + uuid;
     }
@@ -1997,13 +2008,13 @@ bool A3::extract_uuid (
   Nibbler n (input);

   std::string uuid;
-  if (n.getUUID (uuid))
+  if (n.getPartialUUID (uuid))
   {
     sequence.push_back (uuid);

     while (n.skip (','))
     {
-      if (!n.getUUID (uuid))
+      if (!n.getPartialUUID (uuid))
         throw std::string (STRING_A3_UUID_AFTER_COMMA);

       sequence.push_back (uuid);
2012-02-19 22:27:40 -05:00
Paul Beckingham
c785836083 Feature #632
- Added feature #632, which allows environment variables TASKRC and TASKDATA
  to override .taskrc and .task directory locations (thanks to Steve Rader).
- Added unit tests.
+
2012-02-19 18:59:28 -05:00
Paul Beckingham
26cc4e11f5 Unit Tests
- Improved verbosity unit tests.
2012-02-13 06:16:18 -05:00
Paul Beckingham
28a4947234 Bug #818
- Fixed bug #818, which caused partial tag matching (thanks to Joe Holloway).
- Note that the regex word boundary anchors are different for Solaris
  and Linux, and largely broken on OSX.
- Added unit tests.
2012-02-12 10:42:24 -05:00
Paul Beckingham
efb2476c15 Unit Tests
- Added bug.924.t unit tests.  I cannot replicate the bug, but a
  regerssion test should prevent any recurrence.
2012-02-12 08:41:08 -05:00
Paul Beckingham
96fe3f42ba Minor Refactoring
- Added support for more type-specific checks of attribute values.
- Added support for more type-specific attribute rendering.
- Improved generalized methods for checking columns in a report.
- Added unit tests.
- Minor code cleanup.
- Added secret hidden feature for internal testing.
2012-02-05 20:56:46 -05:00
Paul Beckingham
8abc541777 Bug #906
- Fixed bug #906, which caused problems with inverted project matching (thanks
  to Uli Martens).
2012-02-02 23:51:31 -05:00
Paul Beckingham
2ce9322a28 Bug #917
- Fixed bug #917, which mis-encoded quotes (thanks to Uli Martens).
- Added unit tests.
- Minor unrelated edits.
2012-02-02 22:58:36 -05:00
Paul Beckingham
89b5c91a35 Unit Tests
- Corrected method name.
2012-01-30 20:27:50 -05:00
Paul Beckingham
5609711d47 Feature #571 - Special tag feedback
- The verbosity token 'special' now controls whether the feedback is provided
  when special tags are added to a task.
- Added new 'special' verbosity token documentation to man page.
- Added missing 'next' special tag to man page.
- Added new localized strings for describing special tags.
2012-01-29 18:28:07 -05:00
Paul Beckingham
bf9e14f581 Bug 899
- Fixed bug #899, which displayed incorrect project completion numbers (thanks
  to Paul-Gheorghe Barbu).
- Added unit tests.
2012-01-29 17:44:43 -05:00
Paul Beckingham
c092b027a6 Code Cleanup
- Removed 'synch_key' tests and file I/O.  Soon, soon...
2012-01-29 17:42:52 -05:00
Paul Beckingham
ec96d929a0 Bug 879 - Description/Annotation ending with Slash Causes Problems
- Backslashes actually.  The escaping mechanism in the low-level parser
  was eating leading \ characters when it should not.  Very hard bug to
  find, trivial to fix.
- Added unit tests to several components while narrowing this down.
2012-01-29 15:36:05 -05:00
Paul Beckingham
15030599fd Unit Tests
- Added more verbosity token tests, which show up some unimplemented
  loose ends.
2012-01-12 16:49:54 -05:00
Paul Beckingham
9853bfee46 Unit Tests
- Restored a 'skip' unit test, because it works most of the time, and
  only fails during the one end of daylight savings day.  Along with
  several others.
2012-01-10 23:19:54 -05:00
Ralph Bean
36ed70ad93 Exports
- Provided sample sqlite3 export script in Python, to serve as a
  starting point for anyone wanting to migrate taskwarrior data into
  a SQL database.  Illustrates JSON parsing and separation of the
  relational data.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2012-01-10 17:58:34 -05:00
Paul Beckingham
0215e708ad Unit Tests
- Fixed bug in TAP 'diag' output generation, which was missing a newline.
2012-01-05 23:29:33 -05:00
Paul Beckingham
938a33f236 Unit Tests
- Typo in #ifdef caused incorrect number of reported tests.
2012-01-05 20:17:03 -05:00
Paul Beckingham
fb38dca1db Parsing
- Integrated modified Nibbler and test code from kronisk.  These
  changes make both test and Nibbler standalone objects, with configurable
  features.
2012-01-05 17:37:50 -05:00
Paul Beckingham
a262d41828 Backlog
- Removed backlog file processing, which slows down processing.  When
  2.1 has taskd support, the backlog will be cleared, but until then there
  is no point in accumulating transactions.
2012-01-03 00:55:20 -05:00
Paul Beckingham
6580095002 Copyright
- Year change.
2012-01-02 23:32:10 -05:00
Paul Beckingham
0001457612 Enhancement
- Added indentTree function that will provide the basis for a new 'projects'
  command, and potentially more.  Includes unit tests.  Based on a patch from
  Ralph Bean.
2011-12-27 15:32:51 -05:00
Wilhelm Schuermann
30a97f5f52 Cleanup
- Removed unnecessary definitions of max() and min(), replaced existent calls
  with std::max().  Precursor to Bugfix #887.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2011-12-18 10:13:21 -05:00
Paul Beckingham
52f70f6901 Regexes
- Added support for \< and \> for Solaris (thanks to Owen Clarke).
2011-12-16 07:44:19 -05:00
Owen Clarke
f173469f98 Unit Tests
- Fixed test so it work on Solaris and Perl 5.8.4.

Signed-off-by: Paul Beckingham <paul@beckingham.net>
2011-12-16 07:36:46 -05:00
Johannes Schlatow
56d652d058 Unit Tests
- re-opened bug #819
2011-12-02 17:11:50 +01:00
Paul Beckingham
e99a03dbcb Unit Tests
- Automatically passes tests that are known problems on OSX.  These are
  limitations in the regex library that cannot be worked around.
2011-12-01 01:01:16 -05:00
Paul Beckingham
6473c9f39b Unit Test Bug
- Fixed an odd bug in the unit tests.  If today is the 14th of the month,
  then subtracting 14 * 86_400 from the current time results in a date that
  is in the prior month.  Except of course, for one month following the shift
  from summer time to standard time, when the test is run between 11:00pm and
  midnight.  The reverse happens in the spring.
2011-11-14 23:40:19 -05:00
Paul Beckingham
7f577e8885 Code Cleanup
- Minor edits.
2011-10-29 10:49:41 -04:00
Paul Beckingham
e5303a2180 Deletion
- An already-completed task may now also be deleted.
- Added unit tests.
2011-10-23 23:49:25 -04:00
Paul Beckingham
dd88965d3a Unit Tests
- The timesheet tests were doing data math wrong.
2011-10-21 00:42:26 -04:00
Paul Beckingham
ba0d471981 Unit Tests
- rx.t was mis-reporting the expected number of tests.
2011-10-21 00:27:02 -04:00
Paul Beckingham
fc9f9980b8 Unit Tests
- Added more word-boundary tests, even though they are broken on OSX.
  I don't think there is anythign we can do about this.
2011-10-16 11:19:33 -04:00