It was possible for `summary` command, when used with the :all hint, to
skip over any intervals that start later than the first interval in the
database.
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
- It seems that recent changes made the `stop` command faster such that these tests aborted with "The end of a date range must be after the start."
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
I would like to use TempDir for the Datafile test in order to cleanup
any datafiles created as part of the test.
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
Move the adjustment of a new open interval that is enclosed by the
current open interval into the validation processing, where the other
overlap resolution takes place.
This will allow the start command to honor the :adjust flag when
starting a new interval that predates the current open interval.
Closes#326
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
It was possible previously to start an interval with a filter earlier
than the current filter, and if the tags matched, the command would
report success without actually moving the start time.
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
- Add tests for JSON output
- Separate different test scenarios
- Optimize JSON output in `TagInfoDatabase::toJson ()`
- Closes#325
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
- This adds the last bits to the PR started by Christian Roesch:
- Some code formatting
- Specifying both id(s) and tag(s) is an error
- Clear range for tag filter: The range is meant to set the new interval's range, not the filter's
- Added tests
- Overhauled test using relative times and testing exported intervals instead of command line output
- Closes#241
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
- Only an open interval can truncate another open interval.
Otherwise the `:adjust` hint has to be applied
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
- Add DatetimeParser::parse_range: If a date contains no time, it is assumed to be a fixed range, else an open range starting at given datetime
- Add tests for summary with named dates 'yesterday' and 'today'
- Remove closing of filter in CmdSummary.cpp
- Closes#333
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
- This file was development only, now any other test file can serve as template for new tests
- Closes#303
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
- Avoid possible clash with lib atomic on macOS, e.g. in /Library/Developer/CommandLineTools/usr/include/c++/v1/memory:668
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
I feel this is expected behavior, but also eliminates the following compile time
warning on one of my systems:
warning: ignoring return value of ‘int system(const char*)’, declared with
attribute warn_unused_result [-Wunused-result]
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
- Removes RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>