• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

basetest/H19-Oct-2021-1,8861,326

docker/H19-Oct-2021-423331

scripts/H19-Oct-2021-1916

simpletap/H19-Oct-2021-263173

test_certs/H19-Oct-2021-1,3361,252

test_hooks/H19-Oct-2021-608148

.gitignoreH A D19-Oct-2021436 3937

READMEH A D19-Oct-20215.7 KiB166106

abbreviation.tH A D19-Oct-20215.6 KiB16596

add.tH A D19-Oct-20218.2 KiB251156

alias.tH A D19-Oct-20218 KiB220128

annotate.tH A D19-Oct-20218.1 KiB218128

append.tH A D19-Oct-20213.2 KiB9643

args.tH A D19-Oct-20213.7 KiB10151

backlog.tH A D19-Oct-20213.2 KiB8945

bash_completion.tH A D19-Oct-20215.8 KiB17798

bash_tap.shH A D19-Oct-20213.5 KiB12279

bash_tap_tw.shH A D19-Oct-20212.1 KiB6431

blocked.tH A D19-Oct-20212 KiB5618

bulk.tH A D19-Oct-20218.8 KiB215127

burndown.tH A D19-Oct-20213.7 KiB10461

calc.tH A D19-Oct-20215.3 KiB14182

calendar.tH A D19-Oct-202110.9 KiB256179

caseless.tH A D19-Oct-20215.1 KiB12470

col.t.cppH A D19-Oct-20213 KiB8240

color.cmd.tH A D19-Oct-20213.3 KiB8341

color.rules.tH A D19-Oct-202110.1 KiB263185

columns.tH A D19-Oct-202118.9 KiB486360

commands.tH A D19-Oct-20212.6 KiB6223

completed.tH A D19-Oct-20212.2 KiB6323

configuration.tH A D19-Oct-20213.8 KiB10153

confirmation.tH A D19-Oct-20214 KiB10252

context.tH A D19-Oct-202126.6 KiB661398

conversionH A D19-Oct-2021340 118

count.tH A D19-Oct-20212.2 KiB6323

custom.config.tH A D19-Oct-20213.3 KiB9645

custom.recur_ind.tH A D19-Oct-20212.6 KiB6828

custom.tH A D19-Oct-20213.5 KiB9249

custom.tag_ind.tH A D19-Oct-20212.5 KiB6828

date.iso.tH A D19-Oct-20212.5 KiB6722

dateformat.tH A D19-Oct-20215.6 KiB15390

datesort.tH A D19-Oct-20212.9 KiB7228

datetime-negative.tH A D19-Oct-202117.1 KiB434238

debug.tH A D19-Oct-20213.4 KiB9441

default.tH A D19-Oct-20214.6 KiB13281

delete.tH A D19-Oct-20215.3 KiB14878

denotate.tH A D19-Oct-20213.7 KiB9845

dependencies.tH A D19-Oct-202112.6 KiB361225

diag.tH A D19-Oct-20212.7 KiB7233

diag_color.tH A D19-Oct-20212.6 KiB7631

dom.t.cppH A D19-Oct-20213.2 KiB9956

dom2.tH A D19-Oct-202118 KiB520383

due.tH A D19-Oct-20215 KiB14587

duplicate.tH A D19-Oct-20214.1 KiB11261

edit.tH A D19-Oct-20213.8 KiB10648

encoding.tH A D19-Oct-20212.9 KiB8436

enpassant.tH A D19-Oct-20214.9 KiB14586

eval.t.cppH A D19-Oct-20217.1 KiB16796

exec.tH A D19-Oct-20212.6 KiB7232

export.tH A D19-Oct-20216.9 KiB203123

feature.559.tH A D19-Oct-20213 KiB7927

feature.default.project.tH A D19-Oct-20218.6 KiB279168

feature.print.empty.columns.tH A D19-Oct-20212.7 KiB7124

feature.recurrence.tH A D19-Oct-20212.6 KiB7427

feedback.tH A D19-Oct-20213 KiB7634

filter.tH A D19-Oct-202139.4 KiB1,156879

fontunderline.tH A D19-Oct-20213.9 KiB9837

format.tH A D19-Oct-20217.8 KiB194131

gc.tH A D19-Oct-20212.8 KiB7939

helpers.tH A D19-Oct-20214.6 KiB13880

history.tH A D19-Oct-202110 KiB180123

hooks.env.tH A D19-Oct-20213.6 KiB9145

hooks.on-add.tH A D19-Oct-20215.7 KiB16497

hooks.on-exit.tH A D19-Oct-20213.9 KiB11257

hooks.on-launch.tH A D19-Oct-20214 KiB11257

hooks.on-modify.tH A D19-Oct-20216.5 KiB181111

hyphenate.tH A D19-Oct-20213.4 KiB9043

ids.tH A D19-Oct-20215.8 KiB173108

import.tH A D19-Oct-202112.3 KiB335235

info.tH A D19-Oct-20215.1 KiB12877

lexer.t.cppH A D19-Oct-202147 KiB601455

limit.tH A D19-Oct-20213.4 KiB10853

list.all.projects.tH A D19-Oct-20212.4 KiB6325

log.tH A D19-Oct-20212.9 KiB8136

logo.tH A D19-Oct-20212.3 KiB5920

math.tH A D19-Oct-20214 KiB11665

modify.tH A D19-Oct-20212.2 KiB6124

nag.tH A D19-Oct-20215.5 KiB16392

obfuscate.tH A D19-Oct-20212.9 KiB8137

oldest.tH A D19-Oct-20214.6 KiB12482

operators.tH A D19-Oct-202113.8 KiB448313

overdue.tH A D19-Oct-20212.2 KiB6222

partial.tH A D19-Oct-20212.2 KiB5920

prepend.tH A D19-Oct-20212.5 KiB6928

pri_sort.tH A D19-Oct-20214.1 KiB11768

problemsH A D19-Oct-20214.3 KiB148108

project.tH A D19-Oct-202117.7 KiB555391

purge.tH A D19-Oct-20215.8 KiB16083

quotes.tH A D19-Oct-20216.1 KiB15980

rc.override.tH A D19-Oct-20212.7 KiB7832

recurrence.tH A D19-Oct-202123.8 KiB664435

reports.tH A D19-Oct-20212.3 KiB6122

run_allH A D19-Oct-20216.9 KiB243174

search.tH A D19-Oct-202110.7 KiB279197

sequence.tH A D19-Oct-20213.6 KiB9752

shell.tH A D19-Oct-20212.2 KiB6021

show.tH A D19-Oct-20213.4 KiB9247

sorting.tH A D19-Oct-202112.8 KiB272175

special.tH A D19-Oct-20212.6 KiB7031

start.tH A D19-Oct-20215.3 KiB167105

stats.tH A D19-Oct-20212.3 KiB6525

stress_testH A D19-Oct-20212.6 KiB9569

substitute.tH A D19-Oct-20214 KiB11462

sugar.tH A D19-Oct-20212.8 KiB7733

summary.tH A D19-Oct-20213.5 KiB10555

t.t.cppH A D19-Oct-20219.1 KiB258148

tag.tH A D19-Oct-202120.8 KiB596457

taskrc.tH A D19-Oct-20212 KiB5517

tdb2.t.cppH A D19-Oct-20214.3 KiB13271

template.tH A D19-Oct-20218 KiB253131

test.cppH A D19-Oct-202113 KiB524432

test.hH A D19-Oct-20212.7 KiB7237

timesheet.tH A D19-Oct-20214 KiB10045

tw-1379.tH A D19-Oct-20215.8 KiB16693

tw-1637.tH A D19-Oct-2021256 104

tw-1643.tH A D19-Oct-2021175 96

tw-1688.tH A D19-Oct-2021513 196

tw-1715.tH A D19-Oct-2021311 114

tw-1718.tH A D19-Oct-2021277 146

tw-1804.tH A D19-Oct-2021598 198

tw-1837.tH A D19-Oct-20212.4 KiB7017

tw-1883.tH A D19-Oct-2021430 1810

tw-1895.tH A D19-Oct-2021100 73

tw-1938.tH A D19-Oct-2021439 113

tw-1999.tH A D19-Oct-20213 KiB9345

tw-20.tH A D19-Oct-20213 KiB8030

tw-2124.tH A D19-Oct-2021346 166

tw-2189.tH A D19-Oct-2021416 189

tw-2257.tH A D19-Oct-2021117 62

tw-2386.tH A D19-Oct-2021138 94

tw-2392.tH A D19-Oct-2021528 217

tw-2429.tH A D19-Oct-2021454 145

tw-2451.tH A D19-Oct-2021212 126

tw-2514.tH A D19-Oct-2021313 126

tw-2530.tH A D19-Oct-2021558 208

tw-2550.tH A D19-Oct-2021727 3416

tw-2563.tH A D19-Oct-20211.4 KiB4621

tw-2575.tH A D19-Oct-20213.4 KiB9260

tw-2581.tH A D19-Oct-2021484 156

tw-262.tH A D19-Oct-20214 KiB10755

tw-295.tH A D19-Oct-20212.3 KiB6217

tw-46.tH A D19-Oct-20212.1 KiB5921

uda.tH A D19-Oct-202112 KiB370242

uda_orphan.tH A D19-Oct-20214.1 KiB10951

uda_report.tH A D19-Oct-20212.8 KiB7634

uda_sort.tH A D19-Oct-20215.3 KiB15898

undo.tH A D19-Oct-20214 KiB11161

unicode.tH A D19-Oct-20214.6 KiB10353

unique.tH A D19-Oct-20213.5 KiB9955

upgrade.tH A D19-Oct-20212.4 KiB6724

urgency.tH A D19-Oct-202112.9 KiB327248

urgency_inherit.tH A D19-Oct-20213 KiB8540

util.t.cppH A D19-Oct-20214.1 KiB9243

uuid.tH A D19-Oct-20219.9 KiB252156

variant_add.t.cppH A D19-Oct-20219.9 KiB240134

variant_and.t.cppH A D19-Oct-20218.2 KiB200129

variant_cast.t.cppH A D19-Oct-202111 KiB260178

variant_divide.t.cppH A D19-Oct-20217.9 KiB20296

variant_equal.t.cppH A D19-Oct-20217.9 KiB192123

variant_exp.t.cppH A D19-Oct-20217.7 KiB19489

variant_gt.t.cppH A D19-Oct-20218 KiB195123

variant_gte.t.cppH A D19-Oct-20218.1 KiB195123

variant_inequal.t.cppH A D19-Oct-20217.9 KiB192123

variant_lt.t.cppH A D19-Oct-20218 KiB195123

variant_lte.t.cppH A D19-Oct-20217.9 KiB192123

variant_match.t.cppH A D19-Oct-202113.4 KiB298201

variant_math.t.cppH A D19-Oct-20211.7 KiB4713

variant_modulo.t.cppH A D19-Oct-20217.7 KiB19892

variant_multiply.t.cppH A D19-Oct-20218.4 KiB213108

variant_nomatch.t.cppH A D19-Oct-202113.6 KiB298201

variant_not.t.cppH A D19-Oct-20212.9 KiB7837

variant_or.t.cppH A D19-Oct-20218.2 KiB200129

variant_partial.t.cppH A D19-Oct-20219 KiB202131

variant_subtract.t.cppH A D19-Oct-20218.5 KiB216110

variant_xor.t.cppH A D19-Oct-20218.8 KiB200129

verbose.tH A D19-Oct-20215.3 KiB14982

version.tH A D19-Oct-20214.4 KiB12166

view.t.cppH A D19-Oct-20215.4 KiB160107

wait.tH A D19-Oct-20214.7 KiB13676

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