Commit graph

9213 commits

Author SHA1 Message Date
Tomas Babej
5317f7c795 bash_tap: Implement mechanism to mark a test as expected failure
Test author can now mark a bash tap test as expected failure by setting
EXPFAIL environment variable to a non-zero value.
2021-01-31 05:04:43 -05:00
Tomas Babej
a5eee5fcc6
tests: Expand tests for #2392 2021-01-30 21:53:37 -05:00
Tomas Babej
bf11ef3f12 docs: Document resolved issues 2021-01-30 21:40:41 -05:00
Tomas Babej
456dfdc8cf CLI2: Handle empty parentheses expressions
Since taskwarrior is a CLI tool, it is likely that it is interacted with
programmatically. As such, expressions that a human would not type, but
are syntactically correct are bound to occur. In particular, task
currently is not able to handle empty parentheses expressions:

    task +PENDING '(' ')'

This is due to "and" operator being injected between +PENDING (which
translates to '( status = pending )' and '('.

Modify the insertJunctions to not insert the 'and' operator between two
sub-expressions if one of them is an empty parentheses expression.

Closes #1896.
2021-01-30 21:40:41 -05:00
Tomas Babej
c6fdb7e590 tests: Add test for TW-1883 (#1896) 2021-01-30 21:40:41 -05:00
Tomas Babej
5525460bdf tests: Add test for TW #2257 2021-01-30 21:40:41 -05:00
Tomas Babej
f96e78b721 tests: Unmark two expectedFailure tests that are now working 2021-01-30 21:40:41 -05:00
Tomas Babej
b2fa368afa tests: Expect failure for another test with project:B) syntax
It could be argued we should not support this syntax (i.e. the ')'
character needs to be surrounded by a space. Note that the ability to
contain ')' as part of the attribute value was explicitly requested (as
a bug report) in TW-1455 (#1481).
2021-01-30 21:40:41 -05:00
Tomas Babej
64b6784f69 ColumnTypeString: Only input of single DOM token should be attempted to be evaluated
Attribute names are often words from natural language (such as start,
end or entry). The ColumnTypeString supports resolving DOM references,
such that task commands like 'task add proj:3.proj' work.

However, the current implementation of the ColumnTypeString::modify
only looks at the first token to determine whether the input is a DOM
reference or not. This mischaracterizes inputs like 'task add
"description:start something"', where the first token of the attribute
value looks like a DOM reference (the 'start' attribute), but is in
fact, a part of larger string.

Since all DOM references are single tokens, only interpret the input as
a possible DOM reference if and only if one token was found.

Closes #1908.
2021-01-30 21:40:41 -05:00
Tomas Babej
fac48e5e93 tests: Add test for TW-1895 (#1908) 2021-01-30 21:40:41 -05:00
Tomas Babej
13cf6decd3 tests: Add test for TW #2386 2021-01-30 21:40:41 -05:00
Tomas Babej
a1471b67fb CLI2: Do not attempt to evaluate values of string attributes 2021-01-30 21:40:41 -05:00
Jan Palus
9548bfdaba build: make sure internal libs are built as static
these libararies are not installed so don't leave the decision up to
enviroment which might build shared libraries resulting in binary
with missing deps after installation

Fixes #2403
2021-01-29 23:05:02 -05:00
Nate Wheeler
9be55fc070 Fixes issue where bash paths were not correctly deconstructed, leading to unit tests failing when the path had a space in it 2021-01-27 21:22:50 -05:00
Tomas Babej
5f39b368b6 docs: Documentation updates related to #2393 2021-01-24 10:51:14 -05:00
Tomas Babej
2df80aac01 CmdCalendar: Default to current month if no due date is present
Previously, if no due date was set on any pending/waiting task, the
calendar output would start at the end of the currently supported date
period.

Default to current month instead.
2021-01-24 10:51:14 -05:00
Tomas Babej
0234cd8122 CmdCalendar: Support due dates up to year 9999 2021-01-24 10:51:14 -05:00
Tomas Babej
22228547ca CmdCalendar: Consider waiting status equivalent to pending for purposes of display
The purpose of displaying due dates on the calendar is to convey the
relative business of any given day. Waiting status signifies a task
should not be displayed in reports yet, but for the purposes of
planning, it should be displayed in the calendar overview.

Closes #2393.
2021-01-24 10:51:14 -05:00
Tomas Babej
89ffe13677 docs: Document TW #2392 2021-01-24 03:08:10 -05:00
Tomas Babej
63383698da tests: Fix dependencies.t test
Fix minor implementation problems and only skip the undeterministic
portion of the tests.
2021-01-24 03:08:10 -05:00
Tomas Babej
7d2fb18e5d tests: Add test for TW #2392 2021-01-24 03:08:10 -05:00
Tomas Babej
05e7c2aff2 Lexer: Do not allow leading zero for two and more digit integers 2021-01-24 03:08:10 -05:00
Tomas Babej
6a33bb8656 Lexer: Do not allow leading zero for number type 2021-01-24 03:08:10 -05:00
Tomas Babej
b9bc0f8c87 tests: expectedFailure decorator takes no arguments 2021-01-24 03:08:10 -05:00
Thomas Lauf
a2384eadde Move licence URL up
This way Github's licensee tool recognizes the MIT license correctly
2021-01-22 20:34:00 +01:00
Tomas Babej
368e323d80 tests: Mark tests as expected failure instead of skip
That way we are notified by the test suite if the underlying issue gets
fixed.
2021-01-18 02:59:11 -05:00
Tomas Babej
5928604752 tests: Remove expected failure marks for relative date resolution
The tests now no longer fail.
2021-01-18 02:59:11 -05:00
Tomas Babej
15a5ced0e1 docs: Document TW #1654 / #2390 2021-01-18 02:59:11 -05:00
Tomas Babej
e46bcf3ab4 NEWS: Document extended Duration values 2021-01-18 02:59:11 -05:00
Tomas Babej
5aa3073703 libshared: Bump libshared to extend Duration value support 2021-01-18 02:59:11 -05:00
Tomas Babej
7935364fce tests: Adjust tests for recent variant changes 2021-01-18 02:59:11 -05:00
Tomas Babej
ef1e889262 ColTypeDate: Do not explicitly add now to relative dates
Relative dates are now implicitly anchored around now datetime point
during casting, hence there is no reason to do this anymore.
2021-01-18 02:59:11 -05:00
Tomas Babej
5e0fc1caab Variant: Ensure implmentation of addition/subtraction of dates/durations does not involve casting
Implicit casting of a duration anchors it around the 'now' point in
time, which would throw off the conversion.
2021-01-18 02:59:11 -05:00
Tomas Babej
7242accb58 Variant: Convert durations into dates as implicitly anchored around now
The _period attribute holds the number of seconds that the Duration
holds, while _date attribute holds the number of seconds since the
beginning of unix epoch (also known as epoch time). As such, it does not
make sense to convert _period directly into _date.

Interpret _period as offset relative to current unix epoch time.

Closes #2390.
2021-01-18 02:59:11 -05:00
Tomas Babej
5e68165556
changelog: Document TW #2389 2021-01-16 18:55:01 -05:00
Tomas Babej
6aed73ee99
scripts: Use full hostname in the PS1 variable for reproduction environment 2021-01-16 18:50:16 -05:00
Tomas Babej
d9c4621e33
cmake: Limit containers to 1GB of memory
This helps debugging issues when task ends up OOMKilled, without having
to exhaust memory of the host machine.
2021-01-16 18:49:12 -05:00
Tomas Babej
1855d2c729
libshared: Bump version 2021-01-16 18:47:40 -05:00
Tomas Babej
71f477e013
cmake: Make builds of make review/reproduce quiet
Reduce noise on the output. The build process still outputs the build
log in case it fails.
2021-01-16 12:43:23 -05:00
Tomas Babej
c72e1ea379
cmake: Do not send local context when for make review/reproduce
The Dockerfiles for make review and make reproduce targets do not use
any information from the local taskwarrior git repository. Use
STDIN-based syntax to ensure local context is not sent to the daemon.

See: https://docs.docker.com/engine/reference/commandline/build/#build-with--
2021-01-16 12:40:56 -05:00
Tomas Babej
94a06ed38a
cmake: Add a custom target for reproducing issue reports
Use by issuing command "make RELEASE=v2.5.2 reproduce" where v2.5.2 can
be substituted by other (tagged) release.
2021-01-16 12:29:35 -05:00
Tomas Babej
35cab8845a
changelog: Document TW #2292 2021-01-14 18:21:44 -05:00
indev
098be0747d fix: remove lock file on interruption of 'task edit' (#2292) 2021-01-14 18:16:34 -05:00
Jochen Sprickerhof
663c6575ce Use str_replace from libshared 2021-01-07 22:37:04 -05:00
Jochen Sprickerhof
a95205357c Support editing multi-line annotations (Closes: #2283)
Since e4b9c1f annotations where JSON encoded in task edit to escape
new lines (\n). But other strings where mangled as well, like https://
becoming https:\/\/, making it hard to edit.

This patch removes the JSON encoding and indents new lines instead.
2021-01-07 22:37:04 -05:00
Tomas Babej
1cbcdf0969
docs: Update ChangeLog with info about the 2.5.3 release 2021-01-04 01:06:04 -05:00
Tomas Babej
09ae7ce44d
NEWS: Update tested configurations 2021-01-04 01:01:10 -05:00
Tomas Babej
620461766e
doc: Document TW #2101 2021-01-02 03:01:33 -05:00
Tomas Babej
9017cd6e53
doc: Update copyright to 2021 2021-01-02 02:48:22 -05:00
Tomas Babej
2ebf4b864d
ColTypeNumeric: Support date and duration variants
If the lexer identifies an expression as an date or a duration, it
should be re-cast into integer value.

Closes #2101.
2021-01-02 00:21:02 -05:00