whatnext 0.2__tar.gz → 0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {whatnext-0.2 → whatnext-0.3}/.github/workflows/publish.yml +1 -1
- {whatnext-0.2 → whatnext-0.3}/CHANGELOG.md +8 -0
- {whatnext-0.2 → whatnext-0.3}/Makefile +6 -0
- {whatnext-0.2 → whatnext-0.3}/PKG-INFO +6 -3
- {whatnext-0.2 → whatnext-0.3}/README.md +5 -2
- {whatnext-0.2 → whatnext-0.3}/docs/basics.md +14 -3
- {whatnext-0.2 → whatnext-0.3}/docs/usage.md +31 -14
- {whatnext-0.2 → whatnext-0.3}/tasks.md +20 -5
- {whatnext-0.2 → whatnext-0.3}/tests/config.bats +2 -0
- whatnext-0.3/tests/list.bats +279 -0
- {whatnext-0.2 → whatnext-0.3}/tests/matching.bats +86 -56
- whatnext-0.3/tests/summary.bats +129 -0
- {whatnext-0.2 → whatnext-0.3}/tests/terminology.bats +2 -0
- whatnext-0.3/tests/test_file.py +79 -0
- {whatnext-0.2 → whatnext-0.3}/tests/test_task.py +1 -1
- {whatnext-0.2 → whatnext-0.3}/tests/usage.bats +17 -4
- {whatnext-0.2 → whatnext-0.3}/tests/version.bats +2 -0
- {whatnext-0.2 → whatnext-0.3}/whatnext/cli.py +100 -99
- whatnext-0.3/whatnext/models.py +235 -0
- whatnext-0.3/whatnext/summary.py +104 -0
- whatnext-0.2/tests/list.bats +0 -143
- whatnext-0.2/whatnext/models.py +0 -150
- {whatnext-0.2 → whatnext-0.3}/.flake8 +0 -0
- {whatnext-0.2 → whatnext-0.3}/.github/workflows/tests.yml +0 -0
- {whatnext-0.2 → whatnext-0.3}/.gitignore +0 -0
- {whatnext-0.2 → whatnext-0.3}/.whatnext +0 -0
- {whatnext-0.2 → whatnext-0.3}/LICENCE +0 -0
- {whatnext-0.2 → whatnext-0.3}/LICENSE +0 -0
- {whatnext-0.2 → whatnext-0.3}/archive/done/tasks.md +0 -0
- {whatnext-0.2 → whatnext-0.3}/docs/dotwhatnext.md +0 -0
- {whatnext-0.2 → whatnext-0.3}/docs/installation.md +0 -0
- {whatnext-0.2 → whatnext-0.3}/pyproject.toml +0 -0
- {whatnext-0.2 → whatnext-0.3}/sample.md +0 -0
- {whatnext-0.2 → whatnext-0.3}/whatnext/__init__.py +0 -0
|
@@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
10
10
|
Nothing, yet.
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
## [v0.3] — 2025-11-29
|
|
14
|
+
|
|
15
|
+
Adding more states to the roster, tasks can be marked as open (unstarted),
|
|
16
|
+
in progress, cancelled, blocked, and completed.
|
|
17
|
+
|
|
18
|
+
Tasks can be filtered by any of these states when showing tasks or summaries.
|
|
19
|
+
|
|
20
|
+
|
|
13
21
|
## [v0.2] — 2025-11-28
|
|
14
22
|
|
|
15
23
|
Filtering tasks by text/header can be helpful. And as useful as it
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: whatnext
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3
|
|
4
4
|
Summary: A lister of tasks found in Markdown files
|
|
5
5
|
Project-URL: Homepage, https://github.com/norm/whatnext
|
|
6
6
|
Project-URL: Repository, https://github.com/norm/whatnext
|
|
@@ -26,8 +26,11 @@ Description-Content-Type: text/markdown
|
|
|
26
26
|
Document your tasks in Markdown files, using ["standard"][sn] notation:
|
|
27
27
|
|
|
28
28
|
```markdown
|
|
29
|
-
- [ ]
|
|
30
|
-
- [
|
|
29
|
+
- [ ] open, this task is outstanding
|
|
30
|
+
- [/] in progress, this task is partially complete
|
|
31
|
+
- [X] complete, this task has been finished
|
|
32
|
+
- [#] cancelled, this task has been scratched
|
|
33
|
+
- [<] blocked, this task needs more input
|
|
31
34
|
```
|
|
32
35
|
|
|
33
36
|
Then install `whatnext`:
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
Document your tasks in Markdown files, using ["standard"][sn] notation:
|
|
4
4
|
|
|
5
5
|
```markdown
|
|
6
|
-
- [ ]
|
|
7
|
-
- [
|
|
6
|
+
- [ ] open, this task is outstanding
|
|
7
|
+
- [/] in progress, this task is partially complete
|
|
8
|
+
- [X] complete, this task has been finished
|
|
9
|
+
- [#] cancelled, this task has been scratched
|
|
10
|
+
- [<] blocked, this task needs more input
|
|
8
11
|
```
|
|
9
12
|
|
|
10
13
|
Then install `whatnext`:
|
|
@@ -3,16 +3,27 @@
|
|
|
3
3
|
Tasks have states, which are indicated as such:
|
|
4
4
|
|
|
5
5
|
```markdown
|
|
6
|
-
- [ ]
|
|
7
|
-
- [
|
|
6
|
+
- [ ] open, this task is outstanding
|
|
7
|
+
- [/] in progress, this task is partially complete
|
|
8
|
+
- [X] complete, this task has been finished
|
|
9
|
+
- [#] cancelled, this task has been scratched
|
|
10
|
+
- [<] blocked, this task needs more input
|
|
11
|
+
|
|
12
|
+
- [@] no idea what this means
|
|
8
13
|
```
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
By default, `whatnext` lists open, in progress, and blocked tasks. In progress
|
|
16
|
+
tasks are shown first, blocked tasks are shown last. Completed and cancelled
|
|
17
|
+
tasks are not listed unless `--all` is used.
|
|
11
18
|
|
|
12
19
|
Headers are used in grouping tasks. The second-level header that comes next
|
|
13
20
|
shows these tasks are a part of the main header. This does not indicate
|
|
14
21
|
a lower priority, only grouping.
|
|
15
22
|
|
|
23
|
+
An unknown state marker will generate a warning, but they can be suppressed
|
|
24
|
+
if you are using other states for a purpose.
|
|
25
|
+
|
|
26
|
+
|
|
16
27
|
## Multiline tasks and indentation
|
|
17
28
|
|
|
18
29
|
Tasks can be indented, and their text can continue across lines:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Usage
|
|
2
2
|
|
|
3
|
-
Without arguments, `whatnext` will show all
|
|
4
|
-
in any Markdown file:
|
|
3
|
+
Without arguments, `whatnext` will show all outstanding tasks (open,
|
|
4
|
+
in progress, and blocked) listed in any Markdown file:
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
(computer)% whatnext
|
|
@@ -10,7 +10,9 @@ sample.md:
|
|
|
10
10
|
- [ ] Do something for the sake of it
|
|
11
11
|
docs/basics.md:
|
|
12
12
|
# Indicating the state of a task
|
|
13
|
-
- [
|
|
13
|
+
- [/] in progress, this task is partially complete
|
|
14
|
+
- [ ] open, this task is outstanding
|
|
15
|
+
- [<] blocked, this task needs more input
|
|
14
16
|
# Indicating the state of a task / Multiline tasks and indentation
|
|
15
17
|
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
16
18
|
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
@@ -19,9 +21,9 @@ docs/basics.md:
|
|
|
19
21
|
|
|
20
22
|
They will be arranged:
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
- by file, depth-last, in alphabetical order
|
|
25
|
+
- grouped under the heading within the file (includes any parental
|
|
26
|
+
headings)
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
## Matching
|
|
@@ -37,10 +39,10 @@ Any argument(s) can be used to filter the output:
|
|
|
37
39
|
names like "doc", this could be ambiguous, use "./doc" to clarify)
|
|
38
40
|
|
|
39
41
|
```bash
|
|
40
|
-
(computer)% whatnext
|
|
42
|
+
(computer)% whatnext open
|
|
41
43
|
docs/basics.md:
|
|
42
44
|
# Indicating the state of a task
|
|
43
|
-
- [ ]
|
|
45
|
+
- [ ] open, this task is outstanding
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
|
|
@@ -61,18 +63,30 @@ docs/basics.md:
|
|
|
61
63
|
- `--config` — path to the [config file](dotwhatnext.md), defaults
|
|
62
64
|
to `.whatnext` or `WHATNEXT_CONFIG`.
|
|
63
65
|
|
|
66
|
+
- `-q` / `--quiet` — suppress warnings (or `WHATNEXT_QUIET=1`).
|
|
67
|
+
|
|
68
|
+
- `-o` / `--open` — show only open tasks.
|
|
69
|
+
|
|
70
|
+
- `-p` / `--partial` — show only in progress tasks.
|
|
71
|
+
|
|
72
|
+
- `-b` / `--blocked` — show only blocked tasks.
|
|
73
|
+
|
|
74
|
+
- `-d` / `--done` — show only completed tasks.
|
|
75
|
+
|
|
76
|
+
- `-c` / `--cancelled` — show only cancelled tasks.
|
|
77
|
+
|
|
64
78
|
- `-s` / `--summary` — summarise the tasks found in files,
|
|
65
79
|
rather than listing the tasks within:
|
|
66
80
|
|
|
67
81
|
```bash
|
|
68
82
|
░░░░░░░░░░░░░░ 0/1 sample.md
|
|
69
|
-
██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1/
|
|
83
|
+
██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1/7 docs/basics.md
|
|
70
84
|
```
|
|
71
85
|
|
|
72
86
|
When there are multiple files, the progress bars are sized relative to the
|
|
73
87
|
task file with the most tasks.
|
|
74
88
|
|
|
75
|
-
- `-a` / `--all` — show all tasks, not just
|
|
89
|
+
- `-a` / `--all` — show all tasks, not just outstanding ones:
|
|
76
90
|
|
|
77
91
|
```bash
|
|
78
92
|
sample.md:
|
|
@@ -80,8 +94,11 @@ docs/basics.md:
|
|
|
80
94
|
- [ ] Do something for the sake of it
|
|
81
95
|
docs/basics.md:
|
|
82
96
|
# Indicating the state of a task
|
|
83
|
-
- [
|
|
84
|
-
- [
|
|
97
|
+
- [/] in progress, this task is partially complete
|
|
98
|
+
- [ ] open, this task is outstanding
|
|
99
|
+
- [X] complete, this task has been finished
|
|
100
|
+
- [#] cancelled, this task has been scratched
|
|
101
|
+
- [<] blocked, this task needs more input
|
|
85
102
|
# Indicating the state of a task / Multiline tasks and indentation
|
|
86
103
|
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
87
104
|
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
@@ -98,8 +115,8 @@ docs/basics.md:
|
|
|
98
115
|
```bash
|
|
99
116
|
(computer)% whatnext --summary --all
|
|
100
117
|
░░░░░░░░░░░░ 0/1 sample.md
|
|
101
|
-
████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1/
|
|
102
|
-
|
|
118
|
+
████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1/7 docs/basics.md
|
|
119
|
+
██████████████████████████████████████████████████ 3/3 archive/done/tasks.md
|
|
103
120
|
```
|
|
104
121
|
|
|
105
122
|
|
|
@@ -27,10 +27,16 @@ which will start to fail if it is removed.)
|
|
|
27
27
|
|
|
28
28
|
# version 0.3 - new statuses
|
|
29
29
|
|
|
30
|
-
- [
|
|
31
|
-
- [
|
|
32
|
-
- [
|
|
33
|
-
- [
|
|
30
|
+
- [X] decide upon and implement "in progress"
|
|
31
|
+
- [X] decide upon and implement "cancelled"
|
|
32
|
+
- [X] decide upon and implement "blocked"
|
|
33
|
+
- [X] warnings for unknown formats
|
|
34
|
+
- [X] filter on incomplete
|
|
35
|
+
- [X] filter on in progress
|
|
36
|
+
- [X] filter on cancelled
|
|
37
|
+
- [X] filter on blocked
|
|
38
|
+
- [X] filter on complete
|
|
39
|
+
- [X] summarise individual states, but not combos
|
|
34
40
|
|
|
35
41
|
|
|
36
42
|
# version 0.4 - priorities
|
|
@@ -38,10 +44,19 @@ which will start to fail if it is removed.)
|
|
|
38
44
|
- [ ] mark a single task as _medium_ priority
|
|
39
45
|
- [ ] mark a single task **high** priority
|
|
40
46
|
- [ ] mark a block of tasks via the header
|
|
41
|
-
- [ ] sort higher priority tasks to the top -- decide if within files
|
|
47
|
+
- [ ] sort higher priority tasks to the top -- decide if within files
|
|
48
|
+
only or entire project
|
|
42
49
|
|
|
43
50
|
|
|
44
51
|
# version 0.5 - deadlines
|
|
45
52
|
|
|
46
53
|
- [ ] mark a single task as having a deadline
|
|
47
54
|
- [ ] embellish deadlines with custom urgency windows
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# version 0.6 - enhancements
|
|
58
|
+
|
|
59
|
+
- [ ] colour-code the output
|
|
60
|
+
- [ ] pick tasks at random
|
|
61
|
+
- [ ] some way to mark a section of Markdown for inclusion in the default
|
|
62
|
+
output
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
bats_require_minimum_version 1.5.0
|
|
2
|
+
|
|
3
|
+
@test "list tasks" {
|
|
4
|
+
run --separate-stderr whatnext
|
|
5
|
+
|
|
6
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
7
|
+
sample.md:
|
|
8
|
+
# Sample task file
|
|
9
|
+
- [ ] Do something for the sake of it
|
|
10
|
+
docs/basics.md:
|
|
11
|
+
# Indicating the state of a task
|
|
12
|
+
- [/] in progress, this task is partially complete
|
|
13
|
+
- [ ] open, this task is outstanding
|
|
14
|
+
- [<] blocked, this task needs more input
|
|
15
|
+
# Indicating the state of a task / Multiline tasks and indentation
|
|
16
|
+
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
17
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
18
|
+
- [ ] Ut enim ad minim veniam,
|
|
19
|
+
EOF
|
|
20
|
+
)
|
|
21
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
22
|
+
|
|
23
|
+
expected_stderr="WARNING: ignoring invalid state '@' in 'no idea what this means',"
|
|
24
|
+
expected_stderr+=" docs/basics.md line 12"
|
|
25
|
+
diff -u <(echo "$expected_stderr") <(echo "$stderr")
|
|
26
|
+
|
|
27
|
+
[ $status -eq 0 ]
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@test "list tasks, changes width" {
|
|
31
|
+
COLUMNS=40 run --separate-stderr whatnext
|
|
32
|
+
|
|
33
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
34
|
+
sample.md:
|
|
35
|
+
# Sample task file
|
|
36
|
+
- [ ] Do something for the sake of
|
|
37
|
+
it
|
|
38
|
+
docs/basics.md:
|
|
39
|
+
# Indicating the state of a task
|
|
40
|
+
- [/] in progress, this task is
|
|
41
|
+
partially complete
|
|
42
|
+
- [ ] open, this task is outstanding
|
|
43
|
+
- [<] blocked, this task needs more
|
|
44
|
+
input
|
|
45
|
+
# Indicating the state of a task /
|
|
46
|
+
Multiline tasks and indentation
|
|
47
|
+
- [ ] Lorem ipsum dolor sit amet,
|
|
48
|
+
consectetur adipisicing elit,
|
|
49
|
+
sed do eiusmod tempor
|
|
50
|
+
incididunt ut labore et dolore
|
|
51
|
+
magna aliqua.
|
|
52
|
+
- [ ] Ut enim ad minim veniam,
|
|
53
|
+
EOF
|
|
54
|
+
)
|
|
55
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
56
|
+
[ $status -eq 0 ]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@test "list all tasks" {
|
|
60
|
+
run --separate-stderr whatnext -a
|
|
61
|
+
|
|
62
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
63
|
+
sample.md:
|
|
64
|
+
# Sample task file
|
|
65
|
+
- [ ] Do something for the sake of it
|
|
66
|
+
docs/basics.md:
|
|
67
|
+
# Indicating the state of a task
|
|
68
|
+
- [/] in progress, this task is partially complete
|
|
69
|
+
- [ ] open, this task is outstanding
|
|
70
|
+
- [<] blocked, this task needs more input
|
|
71
|
+
- [X] complete, this task has been finished
|
|
72
|
+
- [#] cancelled, this task has been scratched
|
|
73
|
+
# Indicating the state of a task / Multiline tasks and indentation
|
|
74
|
+
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
75
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
76
|
+
- [ ] Ut enim ad minim veniam,
|
|
77
|
+
archive/done/tasks.md:
|
|
78
|
+
# Some old stuff
|
|
79
|
+
- [X] Do the first thing
|
|
80
|
+
- [X] Do the second thing
|
|
81
|
+
- [x] do the last thing all lowercase
|
|
82
|
+
EOF
|
|
83
|
+
)
|
|
84
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
85
|
+
[ $status -eq 0 ]
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@test "list tasks with --dir" {
|
|
89
|
+
cp -r . "$BATS_TEST_TMPDIR/project"
|
|
90
|
+
|
|
91
|
+
run --separate-stderr whatnext --dir "$BATS_TEST_TMPDIR/project"
|
|
92
|
+
|
|
93
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
94
|
+
sample.md:
|
|
95
|
+
# Sample task file
|
|
96
|
+
- [ ] Do something for the sake of it
|
|
97
|
+
docs/basics.md:
|
|
98
|
+
# Indicating the state of a task
|
|
99
|
+
- [/] in progress, this task is partially complete
|
|
100
|
+
- [ ] open, this task is outstanding
|
|
101
|
+
- [<] blocked, this task needs more input
|
|
102
|
+
# Indicating the state of a task / Multiline tasks and indentation
|
|
103
|
+
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
104
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
105
|
+
- [ ] Ut enim ad minim veniam,
|
|
106
|
+
EOF
|
|
107
|
+
)
|
|
108
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
109
|
+
[ $status -eq 0 ]
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@test "warnings suppressed with --quiet" {
|
|
113
|
+
run --separate-stderr whatnext --quiet
|
|
114
|
+
[ $status -eq 0 ]
|
|
115
|
+
[ -z "$stderr" ]
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@test "warnings suppressed with WHATNEXT_QUIET=1" {
|
|
119
|
+
WHATNEXT_QUIET=1 run --separate-stderr whatnext
|
|
120
|
+
[ $status -eq 0 ]
|
|
121
|
+
[ -z "$stderr" ]
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@test "--open filters to open tasks" {
|
|
125
|
+
run --separate-stderr whatnext --open docs/basics.md
|
|
126
|
+
|
|
127
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
128
|
+
docs/basics.md:
|
|
129
|
+
# Indicating the state of a task
|
|
130
|
+
- [ ] open, this task is outstanding
|
|
131
|
+
# Indicating the state of a task / Multiline tasks and indentation
|
|
132
|
+
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
133
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
134
|
+
- [ ] Ut enim ad minim veniam,
|
|
135
|
+
EOF
|
|
136
|
+
)
|
|
137
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
138
|
+
[ $status -eq 0 ]
|
|
139
|
+
|
|
140
|
+
# short flag
|
|
141
|
+
run --separate-stderr whatnext -o docs/basics.md
|
|
142
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
143
|
+
[ $status -eq 0 ]
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@test "--partial filters to in progress tasks" {
|
|
147
|
+
run --separate-stderr whatnext --partial docs/basics.md
|
|
148
|
+
|
|
149
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
150
|
+
docs/basics.md:
|
|
151
|
+
# Indicating the state of a task
|
|
152
|
+
- [/] in progress, this task is partially complete
|
|
153
|
+
EOF
|
|
154
|
+
)
|
|
155
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
156
|
+
[ $status -eq 0 ]
|
|
157
|
+
|
|
158
|
+
# short flag
|
|
159
|
+
run --separate-stderr whatnext -p docs/basics.md
|
|
160
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
161
|
+
[ $status -eq 0 ]
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@test "--blocked filters to blocked tasks" {
|
|
165
|
+
run --separate-stderr whatnext --blocked docs/basics.md
|
|
166
|
+
|
|
167
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
168
|
+
docs/basics.md:
|
|
169
|
+
# Indicating the state of a task
|
|
170
|
+
- [<] blocked, this task needs more input
|
|
171
|
+
EOF
|
|
172
|
+
)
|
|
173
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
174
|
+
[ $status -eq 0 ]
|
|
175
|
+
|
|
176
|
+
# short flag
|
|
177
|
+
run --separate-stderr whatnext -b docs/basics.md
|
|
178
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
179
|
+
[ $status -eq 0 ]
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@test "--done filters to completed tasks" {
|
|
183
|
+
run --separate-stderr whatnext --done docs/basics.md
|
|
184
|
+
|
|
185
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
186
|
+
docs/basics.md:
|
|
187
|
+
# Indicating the state of a task
|
|
188
|
+
- [X] complete, this task has been finished
|
|
189
|
+
EOF
|
|
190
|
+
)
|
|
191
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
192
|
+
[ $status -eq 0 ]
|
|
193
|
+
|
|
194
|
+
# short flag
|
|
195
|
+
run --separate-stderr whatnext -d docs/basics.md
|
|
196
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
197
|
+
[ $status -eq 0 ]
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@test "--cancelled filters to cancelled tasks" {
|
|
201
|
+
run --separate-stderr whatnext --cancelled docs/basics.md
|
|
202
|
+
|
|
203
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
204
|
+
docs/basics.md:
|
|
205
|
+
# Indicating the state of a task
|
|
206
|
+
- [#] cancelled, this task has been scratched
|
|
207
|
+
EOF
|
|
208
|
+
)
|
|
209
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
210
|
+
[ $status -eq 0 ]
|
|
211
|
+
|
|
212
|
+
# short flag
|
|
213
|
+
run --separate-stderr whatnext -c docs/basics.md
|
|
214
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
215
|
+
[ $status -eq 0 ]
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@test "state filters can be combined" {
|
|
219
|
+
run --separate-stderr whatnext -bc docs/basics.md
|
|
220
|
+
|
|
221
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
222
|
+
docs/basics.md:
|
|
223
|
+
# Indicating the state of a task
|
|
224
|
+
- [<] blocked, this task needs more input
|
|
225
|
+
- [#] cancelled, this task has been scratched
|
|
226
|
+
EOF
|
|
227
|
+
)
|
|
228
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
229
|
+
[ $status -eq 0 ]
|
|
230
|
+
|
|
231
|
+
run --separate-stderr whatnext -op docs/basics.md
|
|
232
|
+
|
|
233
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
234
|
+
docs/basics.md:
|
|
235
|
+
# Indicating the state of a task
|
|
236
|
+
- [/] in progress, this task is partially complete
|
|
237
|
+
- [ ] open, this task is outstanding
|
|
238
|
+
# Indicating the state of a task / Multiline tasks and indentation
|
|
239
|
+
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
240
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
241
|
+
- [ ] Ut enim ad minim veniam,
|
|
242
|
+
EOF
|
|
243
|
+
)
|
|
244
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
245
|
+
[ $status -eq 0 ]
|
|
246
|
+
|
|
247
|
+
run --separate-stderr whatnext -bcdop docs/basics.md
|
|
248
|
+
|
|
249
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
250
|
+
docs/basics.md:
|
|
251
|
+
# Indicating the state of a task
|
|
252
|
+
- [/] in progress, this task is partially complete
|
|
253
|
+
- [ ] open, this task is outstanding
|
|
254
|
+
- [<] blocked, this task needs more input
|
|
255
|
+
- [X] complete, this task has been finished
|
|
256
|
+
- [#] cancelled, this task has been scratched
|
|
257
|
+
# Indicating the state of a task / Multiline tasks and indentation
|
|
258
|
+
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
259
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
260
|
+
- [ ] Ut enim ad minim veniam,
|
|
261
|
+
EOF
|
|
262
|
+
)
|
|
263
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
264
|
+
[ $status -eq 0 ]
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
@test "state filter combines with search" {
|
|
268
|
+
run --separate-stderr whatnext --open lorem docs/basics.md
|
|
269
|
+
|
|
270
|
+
expected_output=$(sed -e 's/^ //' <<" EOF"
|
|
271
|
+
docs/basics.md:
|
|
272
|
+
# Indicating the state of a task / Multiline tasks and indentation
|
|
273
|
+
- [ ] Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
|
274
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
275
|
+
EOF
|
|
276
|
+
)
|
|
277
|
+
diff -u <(echo "$expected_output") <(echo "$output")
|
|
278
|
+
[ $status -eq 0 ]
|
|
279
|
+
}
|