Skip to content

Commit 731f62d

Browse files
committed
Relax assumptions about log file format
We only need to test, that the correct lines still contain the total time and self time, the rest doesn't really matter. We need to relax this, because while 77bd3e8 fixed the tests for vim, it broke them for neovim, as that specific patch wasn't cherry-picked into neovim yet.
1 parent 77bd3e8 commit 731f62d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_general.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ func Test_performance()
145145
call assert_equal(printf("Called %d times", call_num), log[2])
146146

147147
let total_time = str2float(log[3]->matchstr('\d\.\d\+'))
148-
call assert_equal(printf("Total time: %.9f", total_time), log[3])
148+
call assert_match("Total time:", log[3])
149149

150150
let self_time = str2float(log[4]->matchstr('\d\.\d\+'))
151-
call assert_equal(printf(" Self time: %.9f", self_time), log[4])
151+
call assert_match("Self time:", log[4])
152152

153153
let individual_time = total_time / call_num
154154
echo printf("Called %d times\nTotal time: %f\n Self time: %f\nIndividual time: %f", call_num, total_time, self_time, individual_time)

0 commit comments

Comments
 (0)