Commit graph

1282 commits

Author SHA1 Message Date
Paul Beckingham
a4fc8aee6a Unit Tests - bug.628.t
- Quoting problem.  To prevent the shell from stripping quotes, the
  command line must include \" ... \", but in a Perl string, that
  needs to be \\" ... \\".  Silly mistake.
2011-08-13 22:27:59 -04:00
Paul Beckingham
be0522d567 Annotation Collisions
- Annotation timestamps are now incremented until unique.  This prevents
  rapid, successive annotations colliding.  The kind that occur during
  unit tests and when using UI wrapper programs.
- Removed 'sleep' commands in unit tests that were added to circumvent
  this.  This speeds up the test suite somewhat.
2011-08-13 21:53:10 -04:00
Paul Beckingham
cb366e0270 Unit Tests - rx.t
- Added a \b word-boundary unit test that isn't working.  Documentation
  says it does.  Computer says no.
2011-08-13 21:09:57 -04:00
Paul Beckingham
30034f057b Bug - A3::extract_modifications
- Broadened the list of argument categories that are downgraded to
  'word' for the purpose of task modification.
2011-08-13 16:24:07 -04:00
Paul Beckingham
5a2fba607e Unit Tests
- New 'problems' script to help identify problem areas in the test
  suite.
2011-08-11 18:25:10 -04:00
Paul Beckingham
92ad842ab8 Unit Tests
- Fixed sorting errors, which were in the tests, not the code.
2011-08-11 18:13:46 -04:00
Paul Beckingham
47ae2ee9f6 Unit Tests
- Added unit tests for Nibbler::getNumber when the input is simply "2.0".
2011-08-10 00:25:03 -04:00
Johannes Schlatow
413f2f6db6 Bug
- merge was playing ping-pong with different undo.data results
  in a setup with three machines
2011-08-09 00:13:21 +02:00
Paul Beckingham
e2a8f85a2f Task Refactoring
- Task is no longer a map of string to Att.  Att is itself a name/
  value pair, so the name was redundant.  Task is now a map of string
  to string.  This brings the obsoletion of Att much closer.
2011-08-07 22:41:25 -04:00
Paul Beckingham
85e77c1958 Code Cleanup
- Merging Record and Task objects, step 5.  Done.
2011-08-07 17:06:06 -04:00
Paul Beckingham
6d00337db3 Code Cleanup
- Merging Record and Task objects, step 1.
2011-08-07 16:23:23 -04:00
Paul Beckingham
3e5bb713eb Merge branch '2.0.0' of tasktools.org:task into 2.0.0 2011-08-06 01:02:49 -04:00
Paul Beckingham
ffa5bc43fe E9
- Working towards arg date/duration eval.
2011-08-06 00:59:14 -04:00
Federico Hernandez
6e1ba161b1 Relative dates
- eoq and soq to refer to the end and start of the quarter
  (thanks to David French)
2011-08-04 01:40:31 +02:00
Paul Beckingham
e5ae145df2 Command - denotate
- Implemented denotate in the new style.
2011-08-02 00:56:29 -04:00
Paul Beckingham
a7f694386a Code Cleanup
- Eliminated obsolete Variant code.
2011-08-01 01:26:59 -04:00
Paul Beckingham
9275f3460f Unit Tests
- Fixed unit test.
2011-08-01 01:17:18 -04:00
Paul Beckingham
ac7bcc81ee Unit Tests
- Corrected all unit tests that used the old syntax "task done 1" to
  use the new syntax "task 1 done".  Similarly, "task 1 ..." is now
  "task 1 modify ...".
2011-07-31 19:03:19 -04:00
Paul Beckingham
9ce7f63d85 Bug
- Fixed bug where argument processing was not properly shut off by
  the terminator -- in A3::tokenize.
2011-07-31 16:18:25 -04:00
Paul Beckingham
a91b6d4564 Attribute Parsing
- Attributes do not contain spaces unless specifically quoted and
  escaped.
2011-07-31 15:19:06 -04:00
Paul Beckingham
ccd32cb7d6 Unit Tests
- add.t contained a broken test that did not take into account a
  (working) substitution.
2011-07-31 13:34:10 -04:00
Paul Beckingham
e61e08c2ca Annotation Bug
- Fixed DOM lookup of special-case attributes: id and urgency are
  not stored in the usual manner, and must be handled differently.
- Removed the responsibility of DOM to evaluate literals, because
  they are handled more effectively in A3::tokenize.
- Fixed old code that assumed ".id" instead of "id".
- Removed unnecessary diag call from annotate.t.
2011-07-31 12:11:36 -04:00
Paul Beckingham
c244132476 Unit Tests
- Fixed bug in Nibbler::getN.
- Added unit test for Nibbler::getN.
2011-07-31 11:14:56 -04:00
Paul Beckingham
01d3da90ae Unit Tests
- Filters must precede write-commands on the command line.
2011-07-31 09:49:23 -04:00
Paul Beckingham
0ee1f9c1c6 Bug #807
- Fixed bug #807, which caused a lack of Lua to prevent tests from building
  (thanks to Owen Clarke).
2011-07-26 21:26:21 -04:00
Paul Beckingham
fde7ec107a Code Cleanup
- Removed obsolete Nibbler::getDOM.
2011-07-26 00:40:29 -04:00
Paul Beckingham
9bf1ec2f7c Code Cleanup
- Eliminated Lexer.
2011-07-26 00:37:49 -04:00
Paul Beckingham
3fd83ca400 Nibbler
- Implemented Nibbler::getName to parse an alpha-numeric name.
- Added appropriate unit tests.
2011-07-24 01:00:24 -04:00
Paul Beckingham
09d94a0712 Expressions
- Eliminated the . prefix for DOM references to the current task - it is
  unnatural to state ".due < today".
- Prioritized parsing dates ahead of integers, which were masking all
  dates.
2011-07-19 00:25:26 -04:00
Paul Beckingham
ab6e230f10 Expressions
- Implemented Nibbler::getWord.
- Re-implemented Nibbler::getDOM.
- Modified DOM addressed for context-based attributes from "due" to ".due",
  the help disambiguate DOM references in expressions.  There is now a
  consistency:

      <id>.due         Task-specific
          .due         Contextual
    <uuid>.due         General

- Implemented associated unit tests.
2011-07-18 23:08:05 -04:00
Paul Beckingham
d66729adf3 Code Cleanup
- Assorted minor edits.
- Snapshot before E9 work.
2011-07-16 23:58:03 -04:00
Paul Beckingham
7fbe124fe0 Unit Tests
- Added proper handling for when no command or filter is specified, and
  no rc.default.command exists.
- Improved wording on above error message.
- Fixed typo in previous commit (managed to check in code before the
  build completed, and ultimately failed).
- Now reports errors that occur during initialization at the same level
  of verbosity as during command execution.
2011-07-16 15:33:09 -04:00
Paul Beckingham
8aeef40b80 Unit Tests
- variant.t.cpp was reporting 6 tests but performing none.  That
  certainly doesn't help our pass rate.
2011-07-16 14:22:42 -04:00
Paul Beckingham
3a5370ddf1 Filters
- Implemented Command::filter_shortcut to detect when a filter begins
  with "status:pending" and skip the loading/parsing of completed.data.
- Removed obsolete att.t.cpp tests.
- Removed diagnostics from TDB2::TDB2 that were causing a segfault.
  I suppose there is no std::cout available during global ctors?
2011-07-14 00:46:01 -04:00
Paul Beckingham
8827f9c978 TDB2
- Implemented CmdAdd.cpp and CmdLog.cpp using TDB2.
- Implemented simple append writes in TDB2.
- Modified CmdImport to accept and parse JSON.
- Added more const-ness in DOM, Expression and Task, to allow TDB2::get_tasks
  to return a const vector ref, which is a Very Good Thing.
- Corrected usage for the export command.
- Implemented Task::urgency as a call to Task::urgency_c, which is a const
  overload to allow urgency calculations (without caching) for const Task
  objects.
- Removed obolete code from TDB.
- Added lots of diagnostic output for TDB2 - it's annoying, but will be
  gone soon.
- Added mention in CmdHelp of the new <filter> and <modifications>
  syntax elements.  Needs more.
- Added Command::filter overload which uses TDB2.  Not in use yet.
2011-07-13 23:53:57 -04:00
Paul Beckingham
2bf4276bda Unit Tests
- Renamed bug.485.x to bug.485.t to reflect that it is not only
  fixed, but relevant.
2011-07-11 01:55:56 -04:00
Paul Beckingham
21ad7a3d3f Unit Tests - add.t
- Corrected typo in unit test results.
2011-07-11 00:26:28 -04:00
Paul Beckingham
8e0296468e Unit Tests
- Improved args.5.t, which was attempting to stop tasks that were
  not started.
2011-07-10 18:04:49 -04:00
Paul Beckingham
f0d2af2651 Filter Bugs
- A substitution arg is categorized as "subst", but was tested for
  "substitution".
- The Arguments::is_multipart method was triggering on '/', which is
  wrong, but I can't remember why I put it in there.  Hmmm.
- When extracting a write-filter, substitutions after the command
  were generating an error, whereas they should be ignored.
- Task::substitute was modifying data even when the patterns were not
  matching.  Yikes.
- Added unit tests for en-passant modification of all types during
  done, delete, start, stop.
2011-07-10 01:03:52 -04:00
Paul Beckingham
69e70889be Unit Tests
- Prevented the info command from running a GC first, which breaks
  certain unit tests.
- Modified delete.t to test annoation on delete.
2011-07-10 00:01:48 -04:00
Paul Beckingham
f483d1ed9d Unit Tests - arguments.t
- Removed two obsolete expression operators, % and ^.
2011-07-09 17:49:41 -04:00
Paul Beckingham
322824567f Unit Tests - args.1.t
- Added tests to verify that '<id> <command>' and '<command> <id>'
  both work as expected.
2011-07-09 17:48:14 -04:00
Paul Beckingham
8ff3a1675d Duration
- Implemented operator+=, operator-=.
- Added unit tests.
2011-07-04 14:22:33 -04:00
Paul Beckingham
fc793e7b1d Duration
- Implemented missing operator<=, operator>=.
- Added corresponding unit tests.
2011-07-04 13:34:20 -04:00
Paul Beckingham
e1aea08f81 Unit Tests
- Fixed test that assumed old-style command usage.
- Corrected duration unit tests.
2011-07-02 10:09:37 -04:00
Paul Beckingham
fd484ee264 Feature
- The duration 'm' is now interpreted as 'months', not 'minutes'.
2011-06-30 18:35:54 -04:00
Paul Beckingham
2c621eaadc Unit Tests
- The dom.t tests were segfaulting because they used a blank Context
  with no arguments, and when the DOM referecne 'context.program' was
  queried, it failed because there was no Context::args[0].
2011-06-27 23:26:51 -04:00
Paul Beckingham
45a757832a Feature #559
- Added feature #559, which implements a new configuration variable,
  rc.exit.on.missing.db, which causes taskwarrior to exit if the
  rc.data.location is missing (thanks to Sander Marechal).
2011-06-27 23:23:28 -04:00
Paul Beckingham
42ead6b34d Report Filters
- Report filters are now properly loaded and injected into the argument
  list.
2011-06-25 21:56:57 -04:00
Paul Beckingham
a7d6b91ad3 Cleanup
- Renamed RegX to RX.  Got sick of the RegX name - looked too much like GenX.
2011-06-21 18:15:58 -04:00