Commit graph

2582 commits

Author SHA1 Message Date
Tomas Babej
26fb4521fe tests: Update commands.t to reflect new signature of CmdAdd
The 'task add' command now accepts context.
2021-04-03 15:01:39 -04:00
Tomas Babej
60bce31df1
tests: Fix TW URL in the version.t test 2021-03-17 22:05:27 -04:00
Tomas Babej
0d1542ccd7
meta: Update various links to https 2021-03-12 07:58:04 -05:00
Tomas Babej
d215bc52b1
tests: Update styling 2021-03-02 20:39:32 -05:00
Rosen Penev
04454a995f clang-tidy: use raw string literals
Found with modernize-raw-string-literals

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-03-02 20:36:02 -05:00
Tomas Babej
cdbab698e3 tests: Add tests for TW #2124 2021-01-31 05:04:43 -05:00
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
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
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
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
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
b9bc0f8c87 tests: expectedFailure decorator takes no arguments 2021-01-24 03:08:10 -05: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
7935364fce tests: Adjust tests for recent variant changes 2021-01-18 02:59:11 -05:00
Tomas Babej
d26f79a458
docs: Update copyright 2021-01-03 22:58:02 -05:00
Tomas Babej
9017cd6e53
doc: Update copyright to 2021 2021-01-02 02:48:22 -05:00
Tomas Babej
c4cdfdae64
tests: Simplify quote and escape tests to make them more transparent
Remove excessive escaping of backslashes with usage of raw strings. This
makes it more obvious what is the test input and expected output.

One test is currently failing after editing and was marked as expected
failure.
2020-12-31 18:10:52 -05:00
Tomas Babej
9753e22d0c
tests: Adjust tests enforcing incorrect behaviour
In 1a001cae, double json-decoding of the attribute values was removed,
and as such we need to adjust tests to actually enforce correct
behaviour.
2020-12-31 14:45:46 -05:00
Tomas Babej
942f43d195
tests: Fix TW bug reference number 2020-12-31 14:20:02 -05:00
Tomas Babej
3b863382b3
tests: Add tests for TW #2060 2020-12-28 20:46:51 -05:00
Tomas Babej
59c20a782d
tests: Definition of someday is in year 9999 now 2020-12-28 01:33:49 -05:00
Tomas Babej
7dfff13b06
tests: Allow match for 8 bit color code in color.rules.t
The test proper coloring for overdue task from an hour ago fails,
even though the task is properly colored. This is because the blue color
gets upgraded to blue color in 256-color scheme, and hence is
represented with 38;5;4m instead of 34m.

Support both representations of the blue color in the given test.
2020-12-14 23:13:44 -05:00
Tomas Babej
83a55ccfe5
tests: Add test for coloring an overdue task from earlier today 2020-12-14 22:35:34 -05:00
Tomas Babej
1a52c59356
tests: Add test to ensure 64 bit time_t 2020-12-10 00:51:41 -05:00
Tomas Babej
af5e81434f
tests: Parallelize more when compiling TW 2020-12-10 00:08:44 -05:00
Tomas Babej
ccb222a31b
tests: Make faketime tests less susceptible to race conditions
The duration can be 10:01 if the original task call happened a split
second before the faketime fixation of +10 minutes.

Use more relaxed regular expresison to check.
2020-12-06 12:02:17 -05:00
Tomas Babej
83f71520d2
tests: Make faketime tests less susceptible to race conditions
The duration can be 10:01 if the original task call happened a split
second before the faketime fixation of +10 minutes.

Use more relaxed regular expresison to check.
2020-12-06 12:00:38 -05:00
Tomas Babej
ee15bfa1db
tests: Skip the diagnostics test on Ubuntu 16.04
This is a byproduct of recent bump to C++17 compliant compilers. Ubuntu
16.04 does not have C++17 compliant compiler, but it's still useful to
for us to test 2.5.3 there as the branch does not actually use any of
the C++17 features not available on gcc on Ubuntu.
2020-12-06 11:48:41 -05:00
Max Rossmannek
fdaabcf956
Update diag.t to correct C++ version
The default C++ version was updated in 4729876 and this commit reflects
this change in the test.
2020-12-06 10:50:30 -05:00
Tomas Babej
c6ec416e30
ci: Rename Arch container to make it clear we're testing on rolling base 2020-12-06 10:09:53 -05:00
Tomas Babej
9a193e26ec
ci: Add support for CentOS 8 2020-12-06 10:09:46 -05:00
Tomas Babej
2657880ff3
ci: Replace F28 and F29 with F31, F32 and F33 2020-12-06 10:09:39 -05:00
Tomas Babej
497262d23c
ci: Add Ubuntu 20.04 2020-12-06 10:09:31 -05:00
Tomas Babej
1b745bc505
ci: Properly setup en_US.UTF-8 locale for Ubuntu containers 2020-12-06 10:09:20 -05:00
Max Rossmannek
2620714b43
Fix Arch docker image 2020-12-06 10:01:54 -05:00
Max Rossmannek
4ebf611b91
Fix faketime packages 2020-12-06 10:01:45 -05:00
Max Rossmannek
862ae0b969
Replace libfaketime with faketime in debianstable
I verified locally that this avoids skipping all of the
faketime-dependent unittests. The Travis CI logs will have to be
investigated for all of the other docker images on which distros we may
need to apply a similar fix.
2020-12-06 10:01:30 -05:00
Max Rossmannek
b634dea7ab
Attempt greedy docker config update
This is an attempt at updating all docker configurations by simply
replacing the `python` packages with `python3`. The Travis CI will let
us know if this works.
2020-12-06 10:01:19 -05:00
Max Rossmannek
2931be613b
Enforce Python 3 in test_hooks/wrapper
This change was not included in the previous commit because the sed
command I used included the `/usr/bin/env` path to ensure I don't
replace any occurences of the word `python` which I did not wish to
replace.
2020-12-06 10:01:09 -05:00
Max Rossmannek
6d2ecaa15c
Enforce Python 3 for unittests
This commit updates all tests to enforce the Python3 executable. This is
necessary because the `assertRegex` function we use was renamed to this
name only in Python 3.2 [1]

For reference:
s;/usr/bin/env python;/usr/bin/env python3;g

[1]: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRegex
2020-12-06 10:00:59 -05:00
Tomas Babej
a8c215774b
tests: Implement mechanism for expected failures in C++ tests
Implements detection of unexpected successes and expected failures. Both
classes are represented in the TAP output as 'not ok', unexpected
successes with '# FIXED' metadata and expected failures as '# TODO'.

This brings C++ tests to feature parity with Python-based ones when it
comes to expected failures and unexpected successes.
2020-12-06 09:56:37 -05:00
Tomas Babej
af49667adb
ci: Rename Arch container to make it clear we're testing on rolling base 2020-12-06 02:42:10 -05:00
Tomas Babej
a6bbeeaab5
ci: Add support for CentOS 8 2020-12-06 01:55:17 -05:00