0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

patch 8.2.0610: some tests are still old style

Problem:    Some tests are still old style.
Solution:   Convert to new style tests. (Yegappan Lakshmanan, closes #5957)
This commit is contained in:
Bram Moolenaar
2020-04-20 16:50:00 +02:00
parent ad4dc83389
commit 08f4157c5c
15 changed files with 178 additions and 106 deletions

View File

@@ -349,7 +349,17 @@ func Test_setreg_basic()
call setreg('I', 'abcI')
call Assert_reg('I', "v", "abcI", "['abcI']", "abcI", "['abcI']")
call Assert_regput('I', ['==', '=abcI='])
" Error cases
call assert_fails('call setreg()', 'E119:')
call assert_fails('call setreg(1)', 'E119:')
call assert_fails('call setreg(1, 2, 3, 4)', 'E118:')
call assert_fails('call setreg([], 2)', 'E730:')
call assert_fails('call setreg(1, {})', 'E731:')
call assert_fails('call setreg(1, 2, [])', 'E730:')
call assert_fails('call setreg("/", ["1", "2"])', 'E883:')
call assert_fails('call setreg("=", ["1", "2"])', 'E883:')
call assert_fails('call setreg(1, ["", "", [], ""])', 'E730:')
endfunc
" vim: shiftwidth=2 sts=2 expandtab