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.
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index ae33935..0e18e4a 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -29,6 +29,7 @@
 
 let s:appendToMe = 'xxx'
 let s:addToMe = 111
+let g:existing = 'yes'
 
 def Test_assignment()
   let bool1: bool = true
@@ -46,6 +47,13 @@
   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)