Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
basetest/ | H | 19-Oct-2021 | - | 1,886 | 1,326 | |
docker/ | H | 19-Oct-2021 | - | 423 | 331 | |
scripts/ | H | 19-Oct-2021 | - | 19 | 16 | |
simpletap/ | H | 19-Oct-2021 | - | 263 | 173 | |
test_certs/ | H | 19-Oct-2021 | - | 1,336 | 1,252 | |
test_hooks/ | H | 19-Oct-2021 | - | 608 | 148 | |
.gitignore | H A D | 19-Oct-2021 | 436 | 39 | 37 | |
README | H A D | 19-Oct-2021 | 5.7 KiB | 166 | 106 | |
abbreviation.t | H A D | 19-Oct-2021 | 5.6 KiB | 165 | 96 | |
add.t | H A D | 19-Oct-2021 | 8.2 KiB | 251 | 156 | |
alias.t | H A D | 19-Oct-2021 | 8 KiB | 220 | 128 | |
annotate.t | H A D | 19-Oct-2021 | 8.1 KiB | 218 | 128 | |
append.t | H A D | 19-Oct-2021 | 3.2 KiB | 96 | 43 | |
args.t | H A D | 19-Oct-2021 | 3.7 KiB | 101 | 51 | |
backlog.t | H A D | 19-Oct-2021 | 3.2 KiB | 89 | 45 | |
bash_completion.t | H A D | 19-Oct-2021 | 5.8 KiB | 177 | 98 | |
bash_tap.sh | H A D | 19-Oct-2021 | 3.5 KiB | 122 | 79 | |
bash_tap_tw.sh | H A D | 19-Oct-2021 | 2.1 KiB | 64 | 31 | |
blocked.t | H A D | 19-Oct-2021 | 2 KiB | 56 | 18 | |
bulk.t | H A D | 19-Oct-2021 | 8.8 KiB | 215 | 127 | |
burndown.t | H A D | 19-Oct-2021 | 3.7 KiB | 104 | 61 | |
calc.t | H A D | 19-Oct-2021 | 5.3 KiB | 141 | 82 | |
calendar.t | H A D | 19-Oct-2021 | 10.9 KiB | 256 | 179 | |
caseless.t | H A D | 19-Oct-2021 | 5.1 KiB | 124 | 70 | |
col.t.cpp | H A D | 19-Oct-2021 | 3 KiB | 82 | 40 | |
color.cmd.t | H A D | 19-Oct-2021 | 3.3 KiB | 83 | 41 | |
color.rules.t | H A D | 19-Oct-2021 | 10.1 KiB | 263 | 185 | |
columns.t | H A D | 19-Oct-2021 | 18.9 KiB | 486 | 360 | |
commands.t | H A D | 19-Oct-2021 | 2.6 KiB | 62 | 23 | |
completed.t | H A D | 19-Oct-2021 | 2.2 KiB | 63 | 23 | |
configuration.t | H A D | 19-Oct-2021 | 3.8 KiB | 101 | 53 | |
confirmation.t | H A D | 19-Oct-2021 | 4 KiB | 102 | 52 | |
context.t | H A D | 19-Oct-2021 | 26.6 KiB | 661 | 398 | |
conversion | H A D | 19-Oct-2021 | 340 | 11 | 8 | |
count.t | H A D | 19-Oct-2021 | 2.2 KiB | 63 | 23 | |
custom.config.t | H A D | 19-Oct-2021 | 3.3 KiB | 96 | 45 | |
custom.recur_ind.t | H A D | 19-Oct-2021 | 2.6 KiB | 68 | 28 | |
custom.t | H A D | 19-Oct-2021 | 3.5 KiB | 92 | 49 | |
custom.tag_ind.t | H A D | 19-Oct-2021 | 2.5 KiB | 68 | 28 | |
date.iso.t | H A D | 19-Oct-2021 | 2.5 KiB | 67 | 22 | |
dateformat.t | H A D | 19-Oct-2021 | 5.6 KiB | 153 | 90 | |
datesort.t | H A D | 19-Oct-2021 | 2.9 KiB | 72 | 28 | |
datetime-negative.t | H A D | 19-Oct-2021 | 17.1 KiB | 434 | 238 | |
debug.t | H A D | 19-Oct-2021 | 3.4 KiB | 94 | 41 | |
default.t | H A D | 19-Oct-2021 | 4.6 KiB | 132 | 81 | |
delete.t | H A D | 19-Oct-2021 | 5.3 KiB | 148 | 78 | |
denotate.t | H A D | 19-Oct-2021 | 3.7 KiB | 98 | 45 | |
dependencies.t | H A D | 19-Oct-2021 | 12.6 KiB | 361 | 225 | |
diag.t | H A D | 19-Oct-2021 | 2.7 KiB | 72 | 33 | |
diag_color.t | H A D | 19-Oct-2021 | 2.6 KiB | 76 | 31 | |
dom.t.cpp | H A D | 19-Oct-2021 | 3.2 KiB | 99 | 56 | |
dom2.t | H A D | 19-Oct-2021 | 18 KiB | 520 | 383 | |
due.t | H A D | 19-Oct-2021 | 5 KiB | 145 | 87 | |
duplicate.t | H A D | 19-Oct-2021 | 4.1 KiB | 112 | 61 | |
edit.t | H A D | 19-Oct-2021 | 3.8 KiB | 106 | 48 | |
encoding.t | H A D | 19-Oct-2021 | 2.9 KiB | 84 | 36 | |
enpassant.t | H A D | 19-Oct-2021 | 4.9 KiB | 145 | 86 | |
eval.t.cpp | H A D | 19-Oct-2021 | 7.1 KiB | 167 | 96 | |
exec.t | H A D | 19-Oct-2021 | 2.6 KiB | 72 | 32 | |
export.t | H A D | 19-Oct-2021 | 6.9 KiB | 203 | 123 | |
feature.559.t | H A D | 19-Oct-2021 | 3 KiB | 79 | 27 | |
feature.default.project.t | H A D | 19-Oct-2021 | 8.6 KiB | 279 | 168 | |
feature.print.empty.columns.t | H A D | 19-Oct-2021 | 2.7 KiB | 71 | 24 | |
feature.recurrence.t | H A D | 19-Oct-2021 | 2.6 KiB | 74 | 27 | |
feedback.t | H A D | 19-Oct-2021 | 3 KiB | 76 | 34 | |
filter.t | H A D | 19-Oct-2021 | 39.4 KiB | 1,156 | 879 | |
fontunderline.t | H A D | 19-Oct-2021 | 3.9 KiB | 98 | 37 | |
format.t | H A D | 19-Oct-2021 | 7.8 KiB | 194 | 131 | |
gc.t | H A D | 19-Oct-2021 | 2.8 KiB | 79 | 39 | |
helpers.t | H A D | 19-Oct-2021 | 4.6 KiB | 138 | 80 | |
history.t | H A D | 19-Oct-2021 | 10 KiB | 180 | 123 | |
hooks.env.t | H A D | 19-Oct-2021 | 3.6 KiB | 91 | 45 | |
hooks.on-add.t | H A D | 19-Oct-2021 | 5.7 KiB | 164 | 97 | |
hooks.on-exit.t | H A D | 19-Oct-2021 | 3.9 KiB | 112 | 57 | |
hooks.on-launch.t | H A D | 19-Oct-2021 | 4 KiB | 112 | 57 | |
hooks.on-modify.t | H A D | 19-Oct-2021 | 6.5 KiB | 181 | 111 | |
hyphenate.t | H A D | 19-Oct-2021 | 3.4 KiB | 90 | 43 | |
ids.t | H A D | 19-Oct-2021 | 5.8 KiB | 173 | 108 | |
import.t | H A D | 19-Oct-2021 | 12.3 KiB | 335 | 235 | |
info.t | H A D | 19-Oct-2021 | 5.1 KiB | 128 | 77 | |
lexer.t.cpp | H A D | 19-Oct-2021 | 47 KiB | 601 | 455 | |
limit.t | H A D | 19-Oct-2021 | 3.4 KiB | 108 | 53 | |
list.all.projects.t | H A D | 19-Oct-2021 | 2.4 KiB | 63 | 25 | |
log.t | H A D | 19-Oct-2021 | 2.9 KiB | 81 | 36 | |
logo.t | H A D | 19-Oct-2021 | 2.3 KiB | 59 | 20 | |
math.t | H A D | 19-Oct-2021 | 4 KiB | 116 | 65 | |
modify.t | H A D | 19-Oct-2021 | 2.2 KiB | 61 | 24 | |
nag.t | H A D | 19-Oct-2021 | 5.5 KiB | 163 | 92 | |
obfuscate.t | H A D | 19-Oct-2021 | 2.9 KiB | 81 | 37 | |
oldest.t | H A D | 19-Oct-2021 | 4.6 KiB | 124 | 82 | |
operators.t | H A D | 19-Oct-2021 | 13.8 KiB | 448 | 313 | |
overdue.t | H A D | 19-Oct-2021 | 2.2 KiB | 62 | 22 | |
partial.t | H A D | 19-Oct-2021 | 2.2 KiB | 59 | 20 | |
prepend.t | H A D | 19-Oct-2021 | 2.5 KiB | 69 | 28 | |
pri_sort.t | H A D | 19-Oct-2021 | 4.1 KiB | 117 | 68 | |
problems | H A D | 19-Oct-2021 | 4.3 KiB | 148 | 108 | |
project.t | H A D | 19-Oct-2021 | 17.7 KiB | 555 | 391 | |
purge.t | H A D | 19-Oct-2021 | 5.8 KiB | 160 | 83 | |
quotes.t | H A D | 19-Oct-2021 | 6.1 KiB | 159 | 80 | |
rc.override.t | H A D | 19-Oct-2021 | 2.7 KiB | 78 | 32 | |
recurrence.t | H A D | 19-Oct-2021 | 23.8 KiB | 664 | 435 | |
reports.t | H A D | 19-Oct-2021 | 2.3 KiB | 61 | 22 | |
run_all | H A D | 19-Oct-2021 | 6.9 KiB | 243 | 174 | |
search.t | H A D | 19-Oct-2021 | 10.7 KiB | 279 | 197 | |
sequence.t | H A D | 19-Oct-2021 | 3.6 KiB | 97 | 52 | |
shell.t | H A D | 19-Oct-2021 | 2.2 KiB | 60 | 21 | |
show.t | H A D | 19-Oct-2021 | 3.4 KiB | 92 | 47 | |
sorting.t | H A D | 19-Oct-2021 | 12.8 KiB | 272 | 175 | |
special.t | H A D | 19-Oct-2021 | 2.6 KiB | 70 | 31 | |
start.t | H A D | 19-Oct-2021 | 5.3 KiB | 167 | 105 | |
stats.t | H A D | 19-Oct-2021 | 2.3 KiB | 65 | 25 | |
stress_test | H A D | 19-Oct-2021 | 2.6 KiB | 95 | 69 | |
substitute.t | H A D | 19-Oct-2021 | 4 KiB | 114 | 62 | |
sugar.t | H A D | 19-Oct-2021 | 2.8 KiB | 77 | 33 | |
summary.t | H A D | 19-Oct-2021 | 3.5 KiB | 105 | 55 | |
t.t.cpp | H A D | 19-Oct-2021 | 9.1 KiB | 258 | 148 | |
tag.t | H A D | 19-Oct-2021 | 20.8 KiB | 596 | 457 | |
taskrc.t | H A D | 19-Oct-2021 | 2 KiB | 55 | 17 | |
tdb2.t.cpp | H A D | 19-Oct-2021 | 4.3 KiB | 132 | 71 | |
template.t | H A D | 19-Oct-2021 | 8 KiB | 253 | 131 | |
test.cpp | H A D | 19-Oct-2021 | 13 KiB | 524 | 432 | |
test.h | H A D | 19-Oct-2021 | 2.7 KiB | 72 | 37 | |
timesheet.t | H A D | 19-Oct-2021 | 4 KiB | 100 | 45 | |
tw-1379.t | H A D | 19-Oct-2021 | 5.8 KiB | 166 | 93 | |
tw-1637.t | H A D | 19-Oct-2021 | 256 | 10 | 4 | |
tw-1643.t | H A D | 19-Oct-2021 | 175 | 9 | 6 | |
tw-1688.t | H A D | 19-Oct-2021 | 513 | 19 | 6 | |
tw-1715.t | H A D | 19-Oct-2021 | 311 | 11 | 4 | |
tw-1718.t | H A D | 19-Oct-2021 | 277 | 14 | 6 | |
tw-1804.t | H A D | 19-Oct-2021 | 598 | 19 | 8 | |
tw-1837.t | H A D | 19-Oct-2021 | 2.4 KiB | 70 | 17 | |
tw-1883.t | H A D | 19-Oct-2021 | 430 | 18 | 10 | |
tw-1895.t | H A D | 19-Oct-2021 | 100 | 7 | 3 | |
tw-1938.t | H A D | 19-Oct-2021 | 439 | 11 | 3 | |
tw-1999.t | H A D | 19-Oct-2021 | 3 KiB | 93 | 45 | |
tw-20.t | H A D | 19-Oct-2021 | 3 KiB | 80 | 30 | |
tw-2124.t | H A D | 19-Oct-2021 | 346 | 16 | 6 | |
tw-2189.t | H A D | 19-Oct-2021 | 416 | 18 | 9 | |
tw-2257.t | H A D | 19-Oct-2021 | 117 | 6 | 2 | |
tw-2386.t | H A D | 19-Oct-2021 | 138 | 9 | 4 | |
tw-2392.t | H A D | 19-Oct-2021 | 528 | 21 | 7 | |
tw-2429.t | H A D | 19-Oct-2021 | 454 | 14 | 5 | |
tw-2451.t | H A D | 19-Oct-2021 | 212 | 12 | 6 | |
tw-2514.t | H A D | 19-Oct-2021 | 313 | 12 | 6 | |
tw-2530.t | H A D | 19-Oct-2021 | 558 | 20 | 8 | |
tw-2550.t | H A D | 19-Oct-2021 | 727 | 34 | 16 | |
tw-2563.t | H A D | 19-Oct-2021 | 1.4 KiB | 46 | 21 | |
tw-2575.t | H A D | 19-Oct-2021 | 3.4 KiB | 92 | 60 | |
tw-2581.t | H A D | 19-Oct-2021 | 484 | 15 | 6 | |
tw-262.t | H A D | 19-Oct-2021 | 4 KiB | 107 | 55 | |
tw-295.t | H A D | 19-Oct-2021 | 2.3 KiB | 62 | 17 | |
tw-46.t | H A D | 19-Oct-2021 | 2.1 KiB | 59 | 21 | |
uda.t | H A D | 19-Oct-2021 | 12 KiB | 370 | 242 | |
uda_orphan.t | H A D | 19-Oct-2021 | 4.1 KiB | 109 | 51 | |
uda_report.t | H A D | 19-Oct-2021 | 2.8 KiB | 76 | 34 | |
uda_sort.t | H A D | 19-Oct-2021 | 5.3 KiB | 158 | 98 | |
undo.t | H A D | 19-Oct-2021 | 4 KiB | 111 | 61 | |
unicode.t | H A D | 19-Oct-2021 | 4.6 KiB | 103 | 53 | |
unique.t | H A D | 19-Oct-2021 | 3.5 KiB | 99 | 55 | |
upgrade.t | H A D | 19-Oct-2021 | 2.4 KiB | 67 | 24 | |
urgency.t | H A D | 19-Oct-2021 | 12.9 KiB | 327 | 248 | |
urgency_inherit.t | H A D | 19-Oct-2021 | 3 KiB | 85 | 40 | |
util.t.cpp | H A D | 19-Oct-2021 | 4.1 KiB | 92 | 43 | |
uuid.t | H A D | 19-Oct-2021 | 9.9 KiB | 252 | 156 | |
variant_add.t.cpp | H A D | 19-Oct-2021 | 9.9 KiB | 240 | 134 | |
variant_and.t.cpp | H A D | 19-Oct-2021 | 8.2 KiB | 200 | 129 | |
variant_cast.t.cpp | H A D | 19-Oct-2021 | 11 KiB | 260 | 178 | |
variant_divide.t.cpp | H A D | 19-Oct-2021 | 7.9 KiB | 202 | 96 | |
variant_equal.t.cpp | H A D | 19-Oct-2021 | 7.9 KiB | 192 | 123 | |
variant_exp.t.cpp | H A D | 19-Oct-2021 | 7.7 KiB | 194 | 89 | |
variant_gt.t.cpp | H A D | 19-Oct-2021 | 8 KiB | 195 | 123 | |
variant_gte.t.cpp | H A D | 19-Oct-2021 | 8.1 KiB | 195 | 123 | |
variant_inequal.t.cpp | H A D | 19-Oct-2021 | 7.9 KiB | 192 | 123 | |
variant_lt.t.cpp | H A D | 19-Oct-2021 | 8 KiB | 195 | 123 | |
variant_lte.t.cpp | H A D | 19-Oct-2021 | 7.9 KiB | 192 | 123 | |
variant_match.t.cpp | H A D | 19-Oct-2021 | 13.4 KiB | 298 | 201 | |
variant_math.t.cpp | H A D | 19-Oct-2021 | 1.7 KiB | 47 | 13 | |
variant_modulo.t.cpp | H A D | 19-Oct-2021 | 7.7 KiB | 198 | 92 | |
variant_multiply.t.cpp | H A D | 19-Oct-2021 | 8.4 KiB | 213 | 108 | |
variant_nomatch.t.cpp | H A D | 19-Oct-2021 | 13.6 KiB | 298 | 201 | |
variant_not.t.cpp | H A D | 19-Oct-2021 | 2.9 KiB | 78 | 37 | |
variant_or.t.cpp | H A D | 19-Oct-2021 | 8.2 KiB | 200 | 129 | |
variant_partial.t.cpp | H A D | 19-Oct-2021 | 9 KiB | 202 | 131 | |
variant_subtract.t.cpp | H A D | 19-Oct-2021 | 8.5 KiB | 216 | 110 | |
variant_xor.t.cpp | H A D | 19-Oct-2021 | 8.8 KiB | 200 | 129 | |
verbose.t | H A D | 19-Oct-2021 | 5.3 KiB | 149 | 82 | |
version.t | H A D | 19-Oct-2021 | 4.4 KiB | 121 | 66 | |
view.t.cpp | H A D | 19-Oct-2021 | 5.4 KiB | 160 | 107 | |
wait.t | H A D | 19-Oct-2021 | 4.7 KiB | 136 | 76 |
README
1README 2====== 3 4This is the task.git/test/README file, and contains notes about the Taskwarrior 5test suite. 6 7 8Running Tests 9------------- 10 11Do this to run all tests: 12 13 $ cd test && make && ./run_all && ./problems 14 15All unit tests produce TAP (Test Anything Protocol) output, and are run by the 16'run_all' test harness. 17 18The 'run_all' script produces an 'all.log' file which is the accumulated output 19of all tests. Before executing 'run_all' you need to compile the C++ unit 20tests, by running 'make' in the 'test' directory. 21 22The script 'problems' will list all the tests that fail, with a count of the 23failing tests, once you have run all the tests and produced an 'all.log' file. 24 25Any TAP harness may be used. 26 27Note that adding the '--serial' option to ./run_all, all tests are executed 28serially. The default runs Python, C++ and Bash tests in parallel. Using 29'--serial' will make for a slower test run. 30 31 32Architecture 33------------ 34 35There are three varieties of tests: 36 37 * C++ unit tests that test low-level object interfaces. These are typically 38 very fast tests, and are exhaustive in nature. 39 40 * Python unit tests that are at the highest level, exercising the command 41 line, hooks and syncing. There is an example, 'template.t', that shows how 42 to perform various high level tests. 43 44 * Bash unit tests, one test per file, using the bash_tap_tw.sh script. These 45 tests are small, quick tests, not intended to be permanent. 46 47All tests are named with the pattern '*.t', and any other forms are not run by 48the test harness. Additionally a test must be set executable (chmod +x) for it 49to be run. In the case of Python tests one can still run them manually by 50launching them with 'python test.t' or simply './test.t'. It also allows us to 51keep tests submitted for bugs that are not scheduled to be fixed in the 52upcoming release, and we don't want the failing tests to prevent us from seeing 53100% pass rate for the bugs we *have* fixed. 54 55 56Goals 57----- 58 59The test suite is evolving, and becoming a better tool for determining whether 60code is ready for release. There are goals that shape these changes, and they 61are: 62 63 * Increase test coverage by testing more features, more thoroughly. The test 64 coverage level is (as of 2016-07-24) at 86.5%. 65 66 * Write fewer bug regression tests. Over time, bug regression tests are less 67 useful than feature tests, and more likely to contain overlapping coverage. 68 69 * Eliminate obsolete tests, which are tests that have overlapping coverage. 70 There is simply no point in testing a feature twice, in the same manner. 71 72 73What Makes a Good Test 74---------------------- 75 76A good test ensures that a feature is functioning as expected, and contains 77both positive and negative aspects, or in other words looks for expected 78behavior as well as looking for the absence of unexpected behavior. 79 80 81Conventions for writing a test 82------------------------------ 83 84If you wish to contribute tests, please consider the following guidelines: 85 86 * For a new bug, an accompanying test is very helpful. Suppose you write up 87 a bug, named TW-1234, then the test would be a script named tw-1234.t, and 88 based on the template.t example. 89 90 Over time, we will migrate the tests in tw-1234.t into a feature-specific 91 test script, such as filter.t, export.t, whichever is appropriate. 92 93 * Tests created after bugs or feature requests should (ideally) have an entry 94 on https://github.com/GothenburgBitFactory/taskwarrior/issues and should 95 include the issue ID in a docstring or comment. 96 97 * Class and method names should be descriptive of what they are testing. 98 Example: TestFilterOnReports 99 100 * Docstrings on Python tests are mandatory. The first line is used as title 101 of the test. Include the issue ID - there are many examples of this. 102 103 * Extra information and details should go into multi-line docstrings or 104 comments. 105 106 * Python tests for bugs or features not yet fixed/implemented should be 107 decorated with: @unittest.skip("WaitingFor TW-xxxx"). We would rather have 108 a live test that is skipped, than no test. 109 110 111How to Submit a Test Change/Addition 112------------------------------------ 113 114Mail it to support@gothenburgbitfactory.org, or attach it to an open bug. 115 116 117Wisdom 118------ 119 120Here are some guildelines that may help: 121 122 * If there are any lexer.t tests failing, then ignore all the others and fix 123 these first. They are fundamental and affect everything else. One Lexer 124 failure can cause 30 symptomatic failures, and addressing any of those is 125 wrong. 126 127 * If any of the C++ tests fail, fix them next, for the same reason as above. 128 129 * If you are about to fix a bug, and no tests are failing, add tests that fail 130 in a script named tw-XXXX.t. Later, someone will incorporate that test 131 script into higher-level feature tests. 132 133 * If the command line parser is not working, start by blaming the Lexer. 134 135 * While the lowest level (C++) tests should be exhaustive, higher level tests 136 should not do the same by iterating over the entire problem space. It is a 137 waste of time. 138 139 * If you find that you are combining two features into one test, you are 140 probably doing it wrong. 141 142 * If you add a feature, then add a test to prove it works, also add a test to 143 prove it doesn't simultaneously generate errors. Furthermore test that with 144 the feature disabled, or command line arguments missing, appropriate errors 145 are reported. 146 147 148TODO 149---- 150 151For anyone looking for test-related tasks to take on, here are some suggestions: 152 153 * Find and eliminate duplicate tests. 154 155 * Using <attribute>.startswith:<value> with rc.regex:off still uses regex. 156 157 * Crazy dateformat values are not tested. 158 159 * Invalid UTF8 is not tested. 160 161 * All the attribute modifiers need to be tested, only a few are. 162 163 * Aliases are not well tested, and fragile. 164 165--- 166