vim-patch:7.4.1993

Problem:    Not all TRUE and FALSE arguments are tested.
Solution:   Add a few more tests.

6bb450145e
This commit is contained in:
James McCoy
2017-02-27 15:00:51 -05:00
parent 2f5aee561e
commit f863b23fd9
2 changed files with 20 additions and 1 deletions

View File

@@ -85,6 +85,25 @@ func Test_true_false_arg()
call Try_arg_true_false('globpath(".", "Xlink", 0, 0, %v%)', "", "./Xlink") call Try_arg_true_false('globpath(".", "Xlink", 0, 0, %v%)', "", "./Xlink")
silent !rm Xlink silent !rm Xlink
endif endif
abbr asdf asdff
call Try_arg_true_false('hasmapto("asdff", "i", %v%)', 0, 1)
call Try_arg_true_false('index(["a", "A"], "A", 0, %v%)', 1, 0)
call Try_arg_true_false('maparg("asdf", "i", %v%)', "", "asdff")
call Try_arg_true_false('maparg("asdf", "i", 1, %v%)', "asdff", {'silent': 0, 'noremap': 0, 'lhs': 'asdf', 'mode': '!', 'nowait': 0, 'expr': 0, 'sid': 3, 'rhs': 'asdff', 'buffer': 0})
call Try_arg_true_false('hasmapto("asdf", "i", %v%)', 0, 1)
new colored
call setline(1, '<here>')
syn match brackets "<.*>"
syn match here "here" transparent
let brackets_id = synID(1, 1, 0)
let here_id = synID(1, 3, 0)
call Try_arg_true_false('synID(1, 3, %v%)', here_id, brackets_id)
bwipe!
endfunc endfunc
function Try_arg_non_zero(expr, false_val, true_val) function Try_arg_non_zero(expr, false_val, true_val)

View File

@@ -447,7 +447,7 @@ static int included_patches[] = {
1996, 1996,
// 1995 NA // 1995 NA
// 1994, // 1994,
// 1993, 1993,
1992, 1992,
1991, 1991,
1990, 1990,