comparison src/testdir/test_vim9_import.vim @ 27265:8a097fc07aa4 v8.2.4161

patch 8.2.4161: Vim9: warning for missing white space after imported variable Commit: https://github.com/vim/vim/commit/21f0d6cbca9c93e2319d45a33ba26b10a85ff4dc Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 20 17:35:49 2022 +0000 patch 8.2.4161: Vim9: warning for missing white space after imported variable Problem: Vim9: warning for missing white space after imported variable. Solution: Do not skip white space. (closes https://github.com/vim/vim/issues/9567)
author Bram Moolenaar <Bram@vim.org>
date Thu, 20 Jan 2022 18:45:04 +0100
parents 73232ed49cf2
children 322b79b002b7
comparison
equal deleted inserted replaced
27264:b2eff72f957e 27265:8a097fc07aa4
65 var local_dict = {ref: expo.Exported} 65 var local_dict = {ref: expo.Exported}
66 return local_dict.ref() 66 return local_dict.ref()
67 enddef 67 enddef
68 g:funcref_result = GetExported() 68 g:funcref_result = GetExported()
69 69
70 def GetName(): string
71 return expo.exp_name .. 'son'
72 enddef
73 g:long_name = GetName()
74
70 g:imported_name = expo.exp_name 75 g:imported_name = expo.exp_name
71 expo.exp_name ..= ' Doe' 76 expo.exp_name ..= ' Doe'
72 expo.exp_name = expo.exp_name .. ' Maar' 77 expo.exp_name = expo.exp_name .. ' Maar'
73 g:imported_name_appended = expo.exp_name 78 g:imported_name_appended = expo.exp_name
74 g:exported_later = expo.exported 79 g:exported_later = expo.exported
96 assert_equal(11, g:exported_later) 101 assert_equal(11, g:exported_later)
97 102
98 assert_equal('Exported', g:imported_func) 103 assert_equal('Exported', g:imported_func)
99 assert_equal('Exported', g:funcref_result) 104 assert_equal('Exported', g:funcref_result)
100 assert_equal('John', g:imported_name) 105 assert_equal('John', g:imported_name)
106 assert_equal('Johnson', g:long_name)
101 assert_equal('John Doe Maar', g:imported_name_appended) 107 assert_equal('John Doe Maar', g:imported_name_appended)
102 assert_false(exists('g:name')) 108 assert_false(exists('g:name'))
103 109
104 Undo_export_script_lines() 110 Undo_export_script_lines()
105 unlet g:exported1 111 unlet g:exported1
107 unlet g:exported3 113 unlet g:exported3
108 unlet g:exported_i1 114 unlet g:exported_i1
109 unlet g:exported_i2 115 unlet g:exported_i2
110 unlet g:exported_later 116 unlet g:exported_later
111 unlet g:imported_func 117 unlet g:imported_func
112 unlet g:imported_name g:imported_name_appended 118 unlet g:imported_name g:long_name g:imported_name_appended
113 delete('Ximport.vim') 119 delete('Ximport.vim')
114 120
115 # similar, with line breaks 121 # similar, with line breaks
116 var import_line_break_script_lines =<< trim END 122 var import_line_break_script_lines =<< trim END
117 vim9script 123 vim9script