~jaap.karssenberg/zim/pyzim-gtk3

« back to all changes in this revision

Viewing changes to tests/tasklist.py

  • Committer: Jaap Karssenberg
  • Date: 2014-11-11 21:17:16 UTC
  • Revision ID: jaap.karssenberg@gmail.com-20141111211716-5llac2ucs0x35p29
Fixed error with parsing "next" in tasks

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
[ ] Bar
100
100
 
101
101
[ ] And then there are @tags
102
 
[ ] And due dates
 
102
[ ] Next: And due dates
103
103
[ ] Date [d: 11/12]
104
104
[ ] Date [d: 11/12/2012]
105
105
        [ ] TODO: BAR !!!
144
144
[ ] B
145
145
        [ ] B-1
146
146
[ ] C
 
147
 
 
148
TODO @home
 
149
[ ] main task
 
150
        [x] do this
 
151
        [ ] Next: do that
 
152
        [ ] Next: do something else
147
153
'''
148
154
 
149
155
                mydate = '%04i-%02i-%02i' % parse_date('11/12')
167
173
                        ]),
168
174
                        (t('Bar'), []),
169
175
                        (t('And then there are @tags', tags='tags'), []),
170
 
                        (t('And due dates'), []),
 
176
                        (t('Next: And due dates', actionable=False), []),
171
177
                        (t('Date [d: 11/12]', due=mydate), []),
172
178
                        (t('Date [d: 11/12/2012]', due='2012-12-11'), [
173
179
                                (t('TODO: BAR !!!', prio=3, due='2012-12-11'), []),
198
204
                                (t('B-1', tags='someday', actionable=False), []),
199
205
                        ]),
200
206
                        (t('C', tags='someday', actionable=False), []),
 
207
                        (t('main task', tags='home'), [
 
208
                                (t('do this', open=False, tags='home'), []),
 
209
                                (t('Next: do that', tags='home'), []),
 
210
                                (t('Next: do something else', tags='home', actionable=False), []),
 
211
                        ])
201
212
                ]
202
213
 
203
214
                plugin.preferences['nonactionable_tags'] = '@someday, @maybe'
212
223
                        (t('B'), []),
213
224
                        (t('C'), []),
214
225
                        (t('FIXME: dus'), []),
 
226
                        (t('Next: And due dates', actionable=False), []),
215
227
                        (t('TODO: BAR !!!', prio=3), []),
216
228
                        # this list inherits the @home tag - and inherits prio
217
229
                        (t('Some more tasks !!!', prio=3, tags='home'), [
227
239
                                (t('B-1', tags='someday', actionable=False), []),
228
240
                        ]),
229
241
                        (t('C', tags='someday', actionable=False), []),
 
242
                        (t('main task', tags='home'), [
 
243
                                (t('do this', open=False, tags='home'), []),
 
244
                                (t('Next: do that', tags='home'), []),
 
245
                                (t('Next: do something else', tags='home', actionable=False), []),
 
246
                        ])
230
247
                ]
231
248
 
232
249
                tasks = extract_tasks(text)