diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-07-01 23:14:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-07-01 23:14:02 +0200 |
commit | 2acfbed9dbea990f129535de7ff3df360365130b (patch) | |
tree | a7a0be95e7ed13ae5450de39b948a1ef34d318c0 /src/testdir/test_expr.vim | |
parent | c5af40ae646ceda817eff93b4f9ba274f031bea6 (diff) | |
download | vim-git-2acfbed9dbea990f129535de7ff3df360365130b.tar.gz |
patch 7.4.1979v7.4.1979
Problem: Getting value of binary option is wrong. (Kent Sibilev)
Solution: Fix type cast. Add a test.
Diffstat (limited to 'src/testdir/test_expr.vim')
-rw-r--r-- | src/testdir/test_expr.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index f44e21660..067dbf24f 100644 --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -106,3 +106,26 @@ func Test_special_char() " The failure is only visible using valgrind. call assert_fails('echo "\<C-">') endfunc + +func Test_option_value() + " boolean + set bri + call assert_equal(1, &bri) + set nobri + call assert_equal(0, &bri) + + " number + set ts=1 + call assert_equal(1, &ts) + set ts=8 + call assert_equal(8, &ts) + + " string + exe "set cedit=\<Esc>" + call assert_equal("\<Esc>", &cedit) + set cpo= + call assert_equal("", &cpo) + set cpo=abcdefgi + call assert_equal("abcdefgi", &cpo) + set cpo&vim +endfunc |