ZyX wrote:

> In the attached script vim prints sequence of ten `27' (that is
> character number of escape) and a `10', while it is supposed to print
> 
> 99
> 104
> 97
> 114
> 115
> 5
> 
> (this is ASCII values of characters in string `chars' and a number of
> symbols).
> Test command:
>     vim -u NONE -c 'so test-normalesc.vim' -c 'messages' -c 'qa!'

I'm not sure this is supposed to work.  ":normal" feeds characters into
Vim, using getchar() is problematic there.

> PS: It looks like it is impossible to write tests for vim plugins
> using vimscript, so I will now have to switch to something like
> pexpect or just stop writing them.

The script you give can also be sourced interactively.

-- 
hundred-and-one symptoms of being an internet addict:
186. You overstay in the office so you can have more time surfing the net.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui