Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 20120:16460964c304 v8.2.0615
patch 8.2.0615: regexp benchmark stest is old style
Commit: https://github.com/vim/vim/commit/ad48e6c1590842ab6d48e6caba3e9250734dae27
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 21 22:19:45 2020 +0200
patch 8.2.0615: regexp benchmark stest is old style
Problem: Regexp benchmark stest is old style.
Solution: Make it a new style test. Fix using a NULL list. Add more tests.
(Yegappan Lakshmanan, closes #5963)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 21 Apr 2020 22:30:03 +0200 |
parents | c087099e9163 |
children | b790d00d5ccb |
comparison
equal
deleted
inserted
replaced
20119:35c4224dc232 | 20120:16460964c304 |
---|---|
851 func Test_popup_invalid_arguments() | 851 func Test_popup_invalid_arguments() |
852 call assert_fails('call popup_create(666, {})', 'E86:') | 852 call assert_fails('call popup_create(666, {})', 'E86:') |
853 call popup_clear() | 853 call popup_clear() |
854 call assert_fails('call popup_create("text", "none")', 'E715:') | 854 call assert_fails('call popup_create("text", "none")', 'E715:') |
855 call popup_clear() | 855 call popup_clear() |
856 call assert_fails('call popup_create(test_null_string(), {})', 'E450:') | |
857 call assert_fails('call popup_create(test_null_list(), {})', 'E450:') | |
858 call popup_clear() | |
856 | 859 |
857 call assert_fails('call popup_create("text", #{col: "xxx"})', 'E475:') | 860 call assert_fails('call popup_create("text", #{col: "xxx"})', 'E475:') |
858 call popup_clear() | 861 call popup_clear() |
859 call assert_fails('call popup_create("text", #{col: "cursor8"})', 'E15:') | 862 call assert_fails('call popup_create("text", #{col: "cursor8"})', 'E15:') |
860 call popup_clear() | 863 call popup_clear() |
899 call popup_clear() | 902 call popup_clear() |
900 call popup_create("text", #{mask: [range(4)]}) | 903 call popup_create("text", #{mask: [range(4)]}) |
901 call popup_clear() | 904 call popup_clear() |
902 call assert_fails('call popup_create("text", #{mask: test_null_list()})', 'E475:') | 905 call assert_fails('call popup_create("text", #{mask: test_null_list()})', 'E475:') |
903 call assert_fails('call popup_create("text", #{mapping: []})', 'E745:') | 906 call assert_fails('call popup_create("text", #{mapping: []})', 'E745:') |
907 call popup_clear() | |
908 call assert_fails('call popup_create("text", #{tabpage : 4})', 'E997:') | |
904 call popup_clear() | 909 call popup_clear() |
905 endfunc | 910 endfunc |
906 | 911 |
907 func Test_win_execute_closing_curwin() | 912 func Test_win_execute_closing_curwin() |
908 split | 913 split |
1111 eval winid->popup_move(#{line: 1}) | 1116 eval winid->popup_move(#{line: 1}) |
1112 redraw | 1117 redraw |
1113 let line = join(map(range(1, 6), 'screenstring(1, v:val)'), '') | 1118 let line = join(map(range(1, 6), 'screenstring(1, v:val)'), '') |
1114 call assert_equal('hworld', line) | 1119 call assert_equal('hworld', line) |
1115 | 1120 |
1121 call assert_fails('call popup_move(winid, [])', 'E715:') | |
1122 call assert_fails('call popup_move(winid, test_null_dict())', 'E715:') | |
1123 | |
1116 call popup_close(winid) | 1124 call popup_close(winid) |
1125 | |
1126 call assert_equal(0, popup_move(-1, {})) | |
1117 | 1127 |
1118 bwipe! | 1128 bwipe! |
1119 endfunc | 1129 endfunc |
1120 | 1130 |
1121 func Test_popup_getpos() | 1131 func Test_popup_getpos() |
2174 let options = popup_getoptions(winid) | 2184 let options = popup_getoptions(winid) |
2175 call assert_equal(0, options.wrap) | 2185 call assert_equal(0, options.wrap) |
2176 call assert_equal(1, options.drag) | 2186 call assert_equal(1, options.drag) |
2177 call assert_equal('Another', options.highlight) | 2187 call assert_equal('Another', options.highlight) |
2178 | 2188 |
2189 call assert_fails('call popup_setoptions(winid, [])', 'E715:') | |
2190 call assert_fails('call popup_setoptions(winid, test_null_dict())', 'E715:') | |
2191 | |
2179 call popup_close(winid) | 2192 call popup_close(winid) |
2193 call assert_equal(0, popup_setoptions(winid, options.wrap)) | |
2180 endfunc | 2194 endfunc |
2181 | 2195 |
2182 func Test_popupwin_garbage_collect() | 2196 func Test_popupwin_garbage_collect() |
2183 func MyPopupFilter(x, winid, c) | 2197 func MyPopupFilter(x, winid, c) |
2184 " NOP | 2198 " NOP |