Patch 9.0.1339

3 views
Skip to first unread message

Bram Moolenaar

unread,
Feb 21, 2023, 3:10:20 PM2/21/23
to vim...@googlegroups.com

Patch 9.0.1339 (after 9.0.1338)
Problem: No test for :disassemble with class function.
Solution: Add a test.
Files: src/testdir/test_vim9_disassemble.vim


*** ../vim-9.0.1338/src/testdir/test_vim9_disassemble.vim 2023-01-28 19:18:56.737720609 +0000
--- src/testdir/test_vim9_disassemble.vim 2023-02-21 20:07:18.015684275 +0000
***************
*** 3006,3009 ****
--- 3006,3049 ----
instr)
enddef

+ def Test_disassemble_class_function()
+ var lines =<< trim END
+ vim9script
+
+ class Cl
+ static def Fc(): string
+ return "x"
+ enddef
+ endclass
+
+ g:instr = execute('disassemble Cl.Fc')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('Fc\_s*' ..
+ 'return "x"\_s*' ..
+ '\d PUSHS "x"\_s*' ..
+ '\d RETURN\_s*',
+ g:instr)
+
+ lines =<< trim END
+ vim9script
+
+ class Cl
+ def Fo(): string
+ return "y"
+ enddef
+ endclass
+
+ g:instr = execute('disassemble Cl.Fo')
+ END
+ v9.CheckScriptSuccess(lines)
+ assert_match('Fo\_s*' ..
+ 'return "y"\_s*' ..
+ '\d PUSHS "y"\_s*' ..
+ '\d RETURN\_s*',
+ g:instr)
+
+ unlet g:instr
+ enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
*** ../vim-9.0.1338/src/version.c 2023-02-21 19:55:02.795958051 +0000
--- src/version.c 2023-02-21 20:09:03.239687283 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1339,
/**/

--
hundred-and-one symptoms of being an internet addict:
166. You have been on your computer soo long that you didn't realize
you had grandchildren.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages