Mercurial > vim
view src/testdir/test_autoload.vim @ 32013:ec05de98b0f7 v9.0.1338
patch 9.0.1338: :defcompile and :disassemble can't find class method
Commit: https://github.com/vim/vim/commit/99a7c0d89cf77c0a908b60191e63f41f04f9e793
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 21 19:55:14 2023 +0000
patch 9.0.1338: :defcompile and :disassemble can't find class method
Problem: :defcompile and :disassemble can't find class method. (Ernie Rael)
Solution: Make a class name and class.method name work. (closes https://github.com/vim/vim/issues/11984)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 21 Feb 2023 21:00:05 +0100 |
parents | 307341b9c227 |
children | a786d0dab454 |
line wrap: on
line source
" Tests for autoload set runtimepath=./sautest func Test_autoload_dict_func() let g:loaded_foo_vim = 0 let g:called_foo_bar_echo = 0 call g:foo#bar.echo() call assert_equal(1, g:loaded_foo_vim) call assert_equal(1, g:called_foo_bar_echo) eval 'bar'->g:foo#addFoo()->assert_equal('barfoo') " empty name works in legacy script call assert_equal('empty', foo#()) endfunc func Test_source_autoload() let g:loaded_sourced_vim = 0 source sautest/autoload/sourced.vim call assert_equal(1, g:loaded_sourced_vim) endfunc func Test_autoload_vim9script() call assert_equal('some', auto9#Getsome()) call assert_equal(49, auto9#Add42(7)) endfunc " vim: shiftwidth=2 sts=2 expandtab