diff options
| author | Josh Wainwright <josh.wainwright@ldra.com> | 2016-04-25 15:32:31 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-26 09:29:39 +0200 |
| commit | e7ff1909a6dd7e25a142787e8718217f2e68dfb5 (patch) | |
| tree | aeccd48441b6a26f5ad8d57eef79294316283dfd /lua/basic_command_register.lua | |
| parent | 164794e60fd382584cdd64808ce837b885f385c1 (diff) | |
| download | vis-e7ff1909a6dd7e25a142787e8718217f2e68dfb5.tar.gz vis-e7ff1909a6dd7e25a142787e8718217f2e68dfb5.tar.xz | |
Add test number information to command_register tests for easier debugging
Diffstat (limited to 'lua/basic_command_register.lua')
| -rw-r--r-- | lua/basic_command_register.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lua/basic_command_register.lua b/lua/basic_command_register.lua index 62afb8b..ec21c66 100644 --- a/lua/basic_command_register.lua +++ b/lua/basic_command_register.lua @@ -1,5 +1,8 @@ local win = vis.win +local cnt = 0 vis:command_register("foo", function(argv, force, win, cursor, range) + cnt = cnt + 1 + append(win, '$', 'test: ' .. cnt) append(win, '$', 'args: ' .. #argv) for i,arg in ipairs(argv) do append(win, '$', '\t' .. i .. ' ' .. arg) @@ -16,12 +19,10 @@ end) vis:command('foo') vis:command('foo!') --- TODO Providing a range does not work vis:command('2,4foo!') vis:command('%foo') vis:command('foo one') vis:command('foo one two') --- TODO Is there a limit on number of arguments? -vis:command('foo one two three four five six seven eight nine ten') +vis:command('foo one two three four five six') vis:command('w! basic_command_register.out') |
