We need to set the value of `MANPATH` to the local man pages when running helper function 'run_cmd_wait_nofail'.
Use the already set Timewarrior environment for this.
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
- Replace unused return variables with '_'
- Use 'expected' and 'actual' for test values
- Add whitespace
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
The command timew help should redirect to the man tool.
Instead of testing that the header of the output matches some reg ex,
test that the outputs of `timew help` and `man` are equal
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
The error message may be different depending on the man tool used.
Therefore, instead of hard-coding it into the test, ensure it is the same as produced by the man command
Closes#512
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This replaces the generation of man pages on project setup
by a on-demand generation via asciidoctor.
An exception are the man pages for the commands `day`, `month`, and `week`
which are simply redirects to the man page `timew-chart.1`. Those are now
static files in the Timewarrior repository.
A CMake find module to detect asciidoctor was added.
If asciidoctor is found, the targets `doc`, `man1`, and `man7` are created.
Those targets are also added to the default build target.
If asciidoctor is not available, the target `doc` is available, but it only
emits a message to install asciidoctor first.
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>