blob: 4a4c644cff65f90b3b7d12f7fcf1b590d4246fd1 [file] [log] [blame]
Bram Moolenaarf6f32c32016-03-12 19:03:59 +01001" Test for assignment
2
3func Test_no_type_checking()
4 let v = 1
5 let v = [1,2,3]
6 let v = {'a': 1, 'b': 2}
7 let v = 3.4
8 let v = 'hello'
9endfunc
Bram Moolenaare353c402017-02-04 19:49:16 +010010
11func Test_let_termcap()
12 " Terminal code
13 let old_t_te = &t_te
14 let &t_te = "\<Esc>[yes;"
15 call assert_match('t_te.*^[[yes;', execute("set termcap"))
16 let &t_te = old_t_te
17
Bram Moolenaar1fb0d492017-02-04 21:50:19 +010018 if !has('gui_running')
19 " Key code
20 let old_t_k1 = &t_k1
21 let &t_k1 = "that"
22 call assert_match('t_k1.*that', execute("set termcap"))
23 let &t_k1 = old_t_k1
24 endif
Bram Moolenaare353c402017-02-04 19:49:16 +010025
26 call assert_fails('let x = &t_xx', 'E15')
27 let &t_xx = "yes"
28 call assert_equal("yes", &t_xx)
29 let &t_xx = ""
30 call assert_fails('let x = &t_xx', 'E15')
31endfunc