Saturday, September 18, 2021

Any idea why tests run in a shell fail?

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.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/b34c70e6-58ed-7589-4f9f-9702d6cd8449%40gmail.com.

No comments: