Commit graph

1879 commits

Author SHA1 Message Date
Paul Beckingham
f19a09b390 Bug
- When handleRecurrence was cloning the parent task, it failed to set
  a new ID, so all the child tasks were given the ID of the parent.
- Cleaned up bug.annual.t.
2011-09-01 01:05:59 -04:00
Paul Beckingham
e0ee80b1a9 Import todo.sh
- Added more unit tests to todo.sh import.
2011-09-01 00:04:18 -04:00
Paul Beckingham
c1a21ce5a4 Export YAML
- Implemented export-yaml.pl as a filter.
- Reimplemented export.yaml.t to use the filter.
2011-08-31 23:52:07 -04:00
Federico Hernandez
dfe72d7de7 Unit tests
- count.t
  log now puts tasks directly into completed
2011-09-01 00:14:16 +02:00
Paul Beckingham
7789692678 Import
- Fixed priority and tag bugs in the todo.sh transform.
- Began (but have not finished) writing unit tests for this.
2011-08-31 02:29:02 -04:00
Paul Beckingham
b09351c517 Task Validation
- Fixed validation bug whereby recurring child tasks inherited the
  parent status ("recurring") instead of the expected "pending".
- Modified 'add' command to code duplicated in Task::validate.
- Cleaned up associated bug.period.t unit test.
2011-08-31 01:34:59 -04:00
Paul Beckingham
b4a583b951 Import - todo.sh
- Wrote a todo.sh parser based on Gina's specs.
- Started unit tests (not finished).
2011-08-30 18:29:57 -04:00
Paul Beckingham
c6837d927f Unit Tests
- Cleaned up 'append' unit tests.
2011-08-30 17:32:58 -04:00
Paul Beckingham
aefe4fa81c Unit Tests
- Cleaned up prepend unit tests.
2011-08-30 17:32:28 -04:00
Paul Beckingham
eeedfc48de Unit Tests
- Removed obsolete import/export unit tests.
2011-08-30 00:57:00 -04:00
Paul Beckingham
380aadd76a Unit Tests
- The export.yaml.t test now verifies env access to task.
2011-08-28 18:16:43 -04:00
Paul Beckingham
1a4916ff03 Unit Tests
- Corrected PATH in env command.
2011-08-28 17:45:28 -04:00
Paul Beckingham
de5bee4353 Bug
- Import was not properly handling tags as a JSON array.  It assumed it
  was a string.
- Modified roundtrip.t tests so they work.
2011-08-28 17:21:49 -04:00
Paul Beckingham
6ab7cec36c Unit Tests - export-yaml.pl
- Rewrote the unit tests for the old export.yaml command to use the
  new export-yaml.pl add-on.
2011-08-28 16:53:49 -04:00
Paul Beckingham
0f627bd44e TDB2
- Added TDB2::clear and TF2::clear methods.
2011-08-28 08:13:41 -04:00
Paul Beckingham
0dd4e6d360 Command: count
- Now generates recurring tasks.
- Cleaned up unit tests.
2011-08-28 00:17:51 -04:00
Paul Beckingham
1e70f00c29 TDB2
- Properly handles cases where tasks are added, then existing data files
  are loaded.  The 'add' list and the 'loaded' list needed to be merged.
2011-08-27 23:30:51 -04:00
Paul Beckingham
d22871b265 Import
- Added unit tests for the 'import' command, which uses JSON as the
  native format.  This is the new default import/export format.  All
  other import/export formats are (to be) implemented as transforms
  to JSON.
2011-08-27 18:42:08 -04:00
Paul Beckingham
0eec42ce4a TDB2
- Corrected maintenance of the _lines vector during TDB2::add_line.
- Implemented TDB2::modify_task undo maintenance.
- Added unit tests for TDB2.  Which fail.
2011-08-27 16:33:19 -04:00
Paul Beckingham
64be6e1cf4 Unit Tests
- Added unit tests for bug 819, on behalf of Matt Kraai.
- Created a new, single test for cleanup that replaces 6.  It's makes
  for shorter unit tests, and adds less test count inflation.  Over
  time, all tests should be modified in a similar way.  This will
  probably cut the total number of unit tests in half, but that's not
  the important metric.
2011-08-26 02:13:32 -04:00
Paul Beckingham
dab06f8672 Code Cleanup
- All objects now use the same convention for naming members.  The
  consistency is a good thing.
2011-08-25 21:54:28 -04:00
Paul Beckingham
02df3853f7 Unit Tests
- Fixed more unit tests that were out of synch with the latest
  functionality, text messages or rendering.
2011-08-24 00:47:44 -04:00
Paul Beckingham
257f5ab3da Bug #458
- Fixed bug #458, removing the ambiguous 'm' as a duration, leaving 'mi[nutes]'
  and 'mo[nths]' requiring at least two characters for a match.
2011-08-23 22:46:32 -04:00
Paul Beckingham
d15cccdb7d Bug #694
- Fixed bug #694, which allows attributes to be modified while annotating a
  task (thanks to Aikido Guy).
2011-08-23 22:30:01 -04:00
Paul Beckingham
2f60bdf9d0 Bug #720
- Fixed bug #720, so that when the 'info' report renders total active time,
  it uses a lossless format (thanks to Bernhard B).
2011-08-23 22:15:00 -04:00
Paul Beckingham
2e09ddd900 Unit Tests
- Fixed some tests that used old message text.
- Fixed tests that relied on 'log'ed tasks still being written into
  pending.data.
- Removed obsolete auto-info tests.
2011-08-23 20:12:19 -04:00
Paul Beckingham
6ed2bcd605 Durations
- Removed support for ' 1 wk', namely spaces before and after the ordinal.
  This removes (some) ambiguity in more complex command lines.
- Fixed unit tests accordingly.
2011-08-21 23:19:10 -04:00
Paul Beckingham
7a778ba317 E9 operator_equal
- Fixed broken logic in operator_equal.
- Fixed typos in op_and.t unit test.
- Fixed descriptions in op_or.t.
2011-08-21 18:38:04 -04:00
Paul Beckingham
f11c8ee5c6 Unit Tests
- Added unit tests for the '<=' and '>=' operators.  All tests pass,
  which makes a nice treat.
- Added more tests to '<' and '>' operators, so that all three data
  types are covered.
2011-08-21 16:45:38 -04:00
Paul Beckingham
a4fca31e7d Unit Tests
- Added unit tests for the '<' and '>' operators.  Many fail.  Sigh.
2011-08-21 16:28:01 -04:00
Paul Beckingham
ee42f9898f Unit Tests
- Added unit tests for the 'and', 'or' and 'xor' operators.  Many of
  them fail.  As expected.
2011-08-21 15:59:47 -04:00
Paul Beckingham
1714601ce4 Duration
- Allowed durations to be specified numerically as seconds, in string form.
  This flexibility allows the removal of special-case handling that stores
  recurrence periods in raw form ('monthly'), reducing code size.  As a
  consequence this means that recurrence may now be rendered according to
  Duration::formatCompact, which is desirable.
- Added supporting unit tests.
2011-08-21 13:32:55 -04:00
Paul Beckingham
1b55a48757 Unit Tests
- Eliminated obsolete benchmark.t.
- Removed the 'quick' mode logic to skip benchmarks in run_all.
- Restored bug.480.t tests that hung earlier.
2011-08-21 01:09:32 -04:00
Paul Beckingham
c6229a6ca6 Unit Tests
- Removed benchmark2.t - it is no longer useful, and duplicates benchmark.t,
  which is itself not long for this world.
2011-08-20 14:56:09 -04:00
Paul Beckingham
438e65036b Expression Refactor
- Arguments are now categorized as either "literal" or a specific
  category, with accompanying type.  Type is inferred for literals,
  and referenced for attributes.
2011-08-20 14:02:48 -04:00
Paul Beckingham
516e368df0 Expression Refactor
- E9 now uses Arg object in place of Term.  This means A3 and E9 are
  now using a common object.
2011-08-20 10:11:24 -04:00
Paul Beckingham
7dd3e081c7 Bug #804 - URL link and break line
- Addressed bug #804 by allowing rc.hyphenate to control whether hyphens are
  inserted when long lines are broken.  This may help prevent xterm from
  mis-parsing URLs in task annotations, when wrapped (thanks to Yann Davin).
- Added unit tests.
2011-08-17 22:39:28 -04:00
Paul Beckingham
08fcb5362e Bug - Durations
- Duration were parsed as <int><unit> in A3, whereas <number><unit> is
  correct.
- Added Nibbler::str method for internal access.
- Nibbler::save, ::restore now return positions.  Useful for extracting
  substrings.
- Modified countdown.t to use the (now) correct units for durations.
2011-08-17 00:45:09 -04:00
Paul Beckingham
ac9d1f3bfa Performance Timing
- Change the was performance measurements are taken.  This in preparation
  to automated daily perf charts, leading to efforts to speed up certain
  operations.
2011-08-15 21:53:01 -04:00
Paul Beckingham
e403574c34 Unit Test - bug.605.t
- Enabled the (failing) unit test, which now stands a chance of being
  fixed.
2011-08-14 21:03:40 -04:00
Paul Beckingham
49cabc1bfd Unit Tests
- All unit tests now clean up the new backlog.data and synch.key files.
2011-08-14 14:09:12 -04:00
Paul Beckingham
3e58453693 Unit Tests - filter-prefix.t
- I had forgotten to remove the unit tests for the ~ inversion modifier.
  This feature, though well implemented, is removed because enhancements
  to filtering are going to be added to the new expressions.  Attribute
  modifiers will continue to be supported, but not enhanced beyond 1.9.4
  functionality..
2011-08-14 00:42:39 -04:00
Paul Beckingham
b5053f3711 Unit Tests - view.t
- Added logic to detect whether the unit tests were being run with output
  attached to a TTY or not, and adjust the expected lines of output
  accordingly.  The !TTY case is the important one.
2011-08-14 00:08:54 -04:00
Paul Beckingham
0ead416574 Unit Test - bug.495.t
- Modified the test to reflect the new handling of -- on the command
  line with respect to quoted text.
2011-08-13 23:58:28 -04:00
Paul Beckingham
beac5ed7e9 Unit Tests - bug.489.t
- The command line construct "tags.none:" is translated into the expression
  "tags = ''", but instead of '=' I had entered '=='.  Force of C/C++/Perl
  habit.
2011-08-13 23:40:22 -04:00
Paul Beckingham
eec0abd1e7 Unit Tests - t2.t
- Removed two unit tests for data file syntax that is no longer
  supported, namely unquoted values.
    Supported:      status:"pending"
    Not supported:  status:pending
2011-08-13 23:34:14 -04:00
Paul Beckingham
fb9e82ed0e TDB2 parsing
- TDB2::load_lines was splitting the text on \n, but because the last
  line contains \n, there was an additional blank line.  This is what
  split_minimal is for.
- split_minimal contained a copy/paste bug that added the extra line
  if the input was non-trivial, instead of if the remainder was non-
  trivial.
- Fixed incorrect unit test accordingly.
2011-08-13 23:19:11 -04:00
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