diff src/testdir/test_vim9_script.vim @ 19449:f8408ba21982 v8.2.0282

patch 8.2.0282: Vim9: setting number option not tested Commit: https://github.com/vim/vim/commit/401d9ffb5a8a40102c000c2d2614aa043f541f90 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 19 18:14:44 2020 +0100 patch 8.2.0282: Vim9: setting number option not tested Problem: Vim9: setting number option not tested. Solution: Add more tests. Fix assigning to global variable.
author Bram Moolenaar <Bram@vim.org>
date Wed, 19 Feb 2020 18:15:05 +0100
parents 6e27e1ffa2a6
children b26e96f7c12f
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -29,6 +29,7 @@ endfunc
 
 let s:appendToMe = 'xxx'
 let s:addToMe = 111
+let g:existing = 'yes'
 
 def Test_assignment()
   let bool1: bool = true
@@ -46,6 +47,13 @@ def Test_assignment()
   let dict1: dict<string> = #{key: 'value'}
   let dict2: dict<number> = #{one: 1, two: 2}
 
+  g:newvar = 'new'
+  assert_equal('new', g:newvar)
+
+  assert_equal('yes', g:existing)
+  g:existing = 'no'
+  assert_equal('no', g:existing)
+
   v:char = 'abc'
   assert_equal('abc', v:char)