Any idea why tests run in a shell fail?

17 views
Skip to first unread message

Gianmaria Bajo

unread,
Sep 18, 2021, 7:55:26 PM9/18/21
to vim...@googlegroups.com
I'm (re)writing a plugin and writing some tests for it. The same tests,
using the same vimrc, fail if started from a shell script, but if I run
the same commands with the same vimrc, directly in the editor, they
work. Any idea why this happens?

Actually not all tests fail, but some does.

For example I have a test:

let g:tests = ['A']

fun! A()
silent tabedit txt/ins1
Norm gm;a123
noau silent write
call assert_equalfile('txt/ins1', 'out/ins1-A')
silent undo
noau silent write
Norm ^]
close!
endfun

where Norm is just 'normal <args>', if started automatically in a shell
script it fails, if I run the same manually it works.
Reply all
Reply to author
Forward
0 new messages