kana / vim-vspec

Vim plugin: Testing framework for Vim script
http://www.vim.org/scripts/script.php?script_id=3012
222 stars 13 forks source link

How to deal with function calling expand... #61

Open sixro opened 3 years ago

sixro commented 3 years ago

Hi, I am using your plugin to write tests on a very old plugin. Unfortunately this plugin calls the builtin vim function expand in a lot of places. In my (first) test, I am doing exactly what you do in yours: I read into a new buffer the content of a fixture. Unfortunately, because it is an unnamed buffer, the expand doesn't return a value and the function I am testing doesn't work as expected.

As a workaround I am doing:

    new
    call PasteCodeFrom('myscenario')
    write MyFile.extension

    [etc...]

as you can imagine, my local folder is full of this written buffers :) Can you share with me a trick I can use in these situations? Regards 🙏