@@ -17,9 +17,9 @@ describe('Clock', function()
17
17
})
18
18
table.insert (files , first_file .filename )
19
19
vim .fn .cursor (3 , 1 )
20
+ local now = Date .now ({ active = false }):to_wrapped_string ()
20
21
vim .cmd ([[ norm ,oxi]] )
21
22
vim .wait (100 )
22
- local now = Date .now ({ active = false }):to_wrapped_string ()
23
23
assert .are .same (' :LOGBOOK:' , vim .fn .getline (5 ))
24
24
assert .are .same (string.format (' CLOCK: %s' , now ), vim .fn .getline (6 ))
25
25
assert .are .same (' :END:' , vim .fn .getline (7 ))
@@ -51,9 +51,9 @@ describe('Clock', function()
51
51
table.insert (files , second_file .filename )
52
52
53
53
vim .fn .cursor (3 , 1 )
54
+ local now = Date .now ({ active = false }):to_wrapped_string ()
54
55
vim .cmd ([[ norm ,oxi]] )
55
56
vim .wait (100 ) -- wait for promise to fulfill
56
- local now = Date .now ({ active = false }):to_wrapped_string ()
57
57
assert .are .same (' :LOGBOOK:' , vim .fn .getline (8 ))
58
58
assert .are .same (string.format (' CLOCK: %s' , now ), vim .fn .getline (9 ))
59
59
assert .are .same (' :END:' , vim .fn .getline (10 ))
@@ -86,9 +86,9 @@ describe('Clock', function()
86
86
87
87
table.insert (files , third_file .filename )
88
88
vim .fn .cursor (3 , 1 )
89
+ local now = Date .now ({ active = false }):to_wrapped_string ()
89
90
vim .cmd ([[ norm ,oxi]] )
90
91
vim .wait (100 ) -- wait for promise to fulfill
91
- local now = Date .now ({ active = false }):to_wrapped_string ()
92
92
assert .are .same (' :LOGBOOK:' , vim .fn .getline (5 ))
93
93
assert .are .same (string.format (' CLOCK: %s' , now ), vim .fn .getline (6 ))
94
94
assert .are .same (' :END:' , vim .fn .getline (7 ))
@@ -115,9 +115,9 @@ describe('Clock', function()
115
115
vim .cmd .edit (files [1 ])
116
116
local old_clock_line = vim .fn .getline (6 )
117
117
vim .fn .cursor (3 , 1 )
118
+ local now = Date .now ({ active = false }):to_wrapped_string ()
118
119
vim .cmd ([[ norm ,oxi]] )
119
120
vim .wait (100 ) -- wait for promise to fulfill
120
- local now = Date .now ({ active = false }):to_wrapped_string ()
121
121
assert .are .same (' :LOGBOOK:' , vim .fn .getline (5 ))
122
122
assert .are .same (string.format (' CLOCK: %s' , now ), vim .fn .getline (6 ))
123
123
assert .are .same (old_clock_line , vim .fn .getline (7 ))
@@ -138,9 +138,9 @@ describe('Clock', function()
138
138
' DEADLINE: <2021-07-21 Wed 22:02>' ,
139
139
})
140
140
vim .fn .cursor (3 , 1 )
141
+ local now = Date .now ({ active = false }):to_wrapped_string ()
141
142
vim .cmd ([[ norm ,oxi]] )
142
143
vim .wait (100 ) -- wait for promise to fulfill
143
- local now = Date .now ({ active = false }):to_wrapped_string ()
144
144
assert .are .same (' :LOGBOOK:' , vim .fn .getline (5 ))
145
145
assert .are .same (string.format (' CLOCK: %s' , now ), vim .fn .getline (6 ))
146
146
assert .are .same (' :END:' , vim .fn .getline (7 ))
0 commit comments