Add support for recurring tasks ("rec:" keyword)
This commit is contained in:
22
tests/include/setup.vader
Normal file
22
tests/include/setup.vader
Normal file
@@ -0,0 +1,22 @@
|
||||
Execute (Clean up test environment):
|
||||
Save maplocalleader
|
||||
|
||||
let maplocalleader = '\'
|
||||
|
||||
function! ReplaceCurrentDates(expected)
|
||||
if a:expected != ''
|
||||
execute "silent! %substitute/" . a:expected . "/**EXPECTED**/"
|
||||
endif
|
||||
execute "silent! %substitute/" . strftime("%Y-%m-%d") . "/**TODAY**/"
|
||||
for b:unit in ['D', 'W', 'M', 'Y']
|
||||
let [s:year, s:month, s:day] = todo#ParseDate(strftime("%Y-%m-%d"))
|
||||
let [s:year, s:month, s:day] = todo#DateAdd(s:year, s:month, s:day, 2, b:unit)
|
||||
let s:duedate = printf('%04d', s:year) . '-' . printf('%02d', s:month) . '-' . printf('%02d', s:day)
|
||||
execute "silent! %substitute/" . s:duedate . "/**TODAY+2" . b:unit . "**/"
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
Before:
|
||||
After:
|
||||
Given:
|
||||
|
||||
Reference in New Issue
Block a user