diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-03-04 18:26:54 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-03-04 18:26:54 +0100 |
| commit | b97c6d29b6a1c66c2596033cd255d6803939aba0 (patch) | |
| tree | 4d0f68ad1f76e7e94214a18281d3419d5ffff591 /lua/basic_cursor.lua | |
| parent | 54dd1d2bf9a6cbfbd754e1e53fdda55f3acbbc15 (diff) | |
| download | vis-b97c6d29b6a1c66c2596033cd255d6803939aba0.tar.gz vis-b97c6d29b6a1c66c2596033cd255d6803939aba0.tar.xz | |
test/lua: convert tests to busted infrastructure
Diffstat (limited to 'lua/basic_cursor.lua')
| -rw-r--r-- | lua/basic_cursor.lua | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/lua/basic_cursor.lua b/lua/basic_cursor.lua deleted file mode 100644 index 525d047..0000000 --- a/lua/basic_cursor.lua +++ /dev/null @@ -1,39 +0,0 @@ -local win = vis.win -local results = {} --- At start cursor is on first line at start -results[1] = win.cursor.line == 1 -results[2] = win.cursor.col == 1 -results[3] = win.cursor.pos == 0 --- Place cursor within text -win.cursor:to(5, 3) -results[4] = win.cursor.line == 5 -results[5] = win.cursor.col == 3 -results[6] = win.cursor.pos == 30 -win.cursor:to(8, 1) -results[7] = win.cursor.line == 8 -results[8] = win.cursor.col == 1 -results[9] = win.cursor.pos == 49 --- Invalid location -win.cursor:to(0, 0) -results[10] = win.cursor.line == 1 -results[11] = win.cursor.col == 1 -results[12] = win.cursor.pos == 0 --- Invalid location, negative -local ok, msg = pcall(function() - win.cursor:to(-20, -20) -end) -results[13] = not ok -results[14] = win.cursor.line == 1 -results[15] = win.cursor.col == 1 -results[16] = win.cursor.pos == 0 --- Invalid location, after end of text, cursor ends up on last char -win.cursor:to(1000, 1000) -results[17] = win.cursor.line == 9 or true -results[18] = win.cursor.col == 1 -results[19] = win.cursor.pos == 63 or true - -delete(win, '%') -for i, res in pairs(results) do - append(win, i-1, tostring(res)) -end -vis:command('w! basic_cursor.out') |
