mirror of
https://github.com/neovim/neovim.git
synced 2025-10-13 13:26:06 +00:00
vim-patch:7.4.1168 (#19645)
Problem: This doesn't give the right result: eval(string(v:true)). (Nikolay
Pavlov)
Solution: Make the string "v:true" instead of "true".
f48aa160fd
This commit is contained in:
@@ -30,12 +30,12 @@
|
||||
#include "nvim/vim.h" // For _()
|
||||
|
||||
const char *const encode_bool_var_names[] = {
|
||||
[kBoolVarTrue] = "true",
|
||||
[kBoolVarFalse] = "false",
|
||||
[kBoolVarTrue] = "v:true",
|
||||
[kBoolVarFalse] = "v:false",
|
||||
};
|
||||
|
||||
const char *const encode_special_var_names[] = {
|
||||
[kSpecialVarNull] = "null",
|
||||
[kSpecialVarNull] = "v:null",
|
||||
};
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
|
@@ -95,7 +95,7 @@ func Test_exit_code()
|
||||
[CODE]
|
||||
|
||||
if RunVim(before, ['quit'], '')
|
||||
call assert_equal(['qp = null', 'ep = null', 'lp = 0', 'l = 0'], readfile('Xtestout'))
|
||||
call assert_equal(['qp = v:null', 'ep = v:null', 'lp = 0', 'l = 0'], readfile('Xtestout'))
|
||||
endif
|
||||
call delete('Xtestout')
|
||||
|
||||
|
@@ -1165,10 +1165,10 @@ func Test_type()
|
||||
" call assert_equal(0, 0 + v:none)
|
||||
call assert_equal(0, 0 + v:null)
|
||||
|
||||
call assert_equal('false', '' . v:false)
|
||||
call assert_equal('true', '' . v:true)
|
||||
" call assert_equal('none', '' . v:none)
|
||||
call assert_equal('null', '' . v:null)
|
||||
call assert_equal('v:false', '' . v:false)
|
||||
call assert_equal('v:true', '' . v:true)
|
||||
" call assert_equal('v:none', '' . v:none)
|
||||
call assert_equal('v:null', '' . v:null)
|
||||
|
||||
call assert_true(v:false == 0)
|
||||
call assert_false(v:false != 0)
|
||||
|
Reference in New Issue
Block a user