Lines Matching refs:v

33     call writefile(v:errors, 'Xtest.out')
98 call assert_true(v:exception =~ 'E171:')
128 call assert_true(v:exception =~ 'E171:')
485 Xpath 'v'
593 let english = v:lang == "C" || v:lang =~ '^[Ee]n'
596 let v:errmsg = ":" . v:errmsg
599 if v:errmsg !~ '^'.a:enr.':' || (english && v:errmsg !~ a:emsg)
601 if v:errmsg == ""
604 let v:errmsg = v:errmsg->escape('"')
605 Xout "Unexpected message:" v:errmsg
628 let v:errmsg = ""
637 let v:errmsg = ""
647 let v:errmsg = ""
1030 let v:errmsg = ''
1040 call assert_match('E171:', v:errmsg)
2786 call assert_equal('E605: Exception not caught: arrgh', v:errmsg)
2806 call assert_equal('E605: Exception not caught: oops', v:errmsg)
2834 call assert_equal('E605: Exception not caught: brrr', v:errmsg)
2856 call assert_equal('E605: Exception not caught: brrr', v:errmsg)
2899 call assert_equal('E121: Undefined variable: novar', v:errmsg)
2919 call assert_equal('E488: Trailing characters: #', v:errmsg)
3432 " Test 57: v:exception and v:throwpoint for user exceptions {{{1
3434 " v:exception evaluates to the value of the exception that was caught
3437 " v:throwpoint evaluates to the script/function name and line number
3448 let g:exception = v:exception
3452 let g:throwpoint = v:throwpoint
3458 command! CmdException let g:exception = v:exception
3459 command! CmdThrowpoint let g:throwpoint = v:throwpoint
3490 let exception = v:exception
3491 let throwpoint = v:throwpoint
3492 call assert_equal("oops", v:exception)
3493 call assert_match('\<F\[1]\.\.G\[1]\.\.T\>', v:throwpoint)
3494 call assert_match('\<2\>', v:throwpoint)
3496 exec "let exception = v:exception"
3497 exec "let throwpoint = v:throwpoint"
3498 call assert_equal("oops", v:exception)
3499 call assert_match('\<F\[1]\.\.G\[1]\.\.T\>', v:throwpoint)
3500 call assert_match('\<2\>', v:throwpoint)
3504 call assert_equal("oops", v:exception)
3505 call assert_match('\<F\[1]\.\.G\[1]\.\.T\>', v:throwpoint)
3506 call assert_match('\<2\>', v:throwpoint)
3510 call assert_equal("oops", v:exception)
3511 call assert_match('\<F\[1]\.\.G\[1]\.\.T\>', v:throwpoint)
3512 call assert_match('\<2\>', v:throwpoint)
3516 call assert_equal("oops", v:exception)
3517 call assert_match('\<F\[1]\.\.G\[1]\.\.T\>', v:throwpoint)
3518 call assert_match('\<2\>', v:throwpoint)
3525 let exception = v:exception
3526 let throwpoint = v:throwpoint
3527 call assert_equal("arrgh", v:exception)
3528 call assert_match('\<G\[1]\.\.T\>', v:throwpoint)
3529 call assert_match('\<4\>', v:throwpoint)
3538 let exception = v:exception
3539 let throwpoint = v:throwpoint
3540 call assert_equal("autsch", v:exception)
3541 call assert_match(fnamemodify(scriptT, ':t'), v:throwpoint)
3542 call assert_match('\<6\>', v:throwpoint)
3545 let exception = v:exception
3546 let throwpoint = v:throwpoint
3547 call assert_equal("arrgh", v:exception)
3548 call assert_match('\<G\[1]\.\.T\>', v:throwpoint)
3549 call assert_match('\<4\>', v:throwpoint)
3557 let exception = v:exception
3558 let throwpoint = v:throwpoint
3559 " Resolve scriptT for matching it against v:throwpoint.
3560 call assert_equal("brrrr", v:exception)
3561 call assert_match(fnamemodify(scriptT, ':t'), v:throwpoint)
3562 call assert_match('\<8\>', v:throwpoint)
3565 let exception = v:exception
3566 let throwpoint = v:throwpoint
3567 call assert_equal("arrgh", v:exception)
3568 call assert_match('\<G\[1]\.\.T\>', v:throwpoint)
3569 call assert_match('\<4\>', v:throwpoint)
3572 let exception = v:exception
3573 let throwpoint = v:throwpoint
3574 call assert_equal("arrgh", v:exception)
3575 call assert_match('\<G\[1]\.\.T\>', v:throwpoint)
3576 call assert_match('\<4\>', v:throwpoint)
3579 let exception = v:exception
3580 let throwpoint = v:throwpoint
3581 call assert_equal("arrgh", v:exception)
3582 call assert_match('\<G\[1]\.\.T\>', v:throwpoint)
3583 call assert_match('\<4\>', v:throwpoint)
3586 let exception = v:exception
3587 let throwpoint = v:throwpoint
3588 call assert_equal("oops", v:exception)
3589 call assert_match('\<F\[1]\.\.G\[1]\.\.T\>', v:throwpoint)
3590 call assert_match('\<2\>', v:throwpoint)
3593 let exception = v:exception
3594 let throwpoint = v:throwpoint
3595 call assert_equal("oops", v:exception)
3596 call assert_match('\<F\[1]\.\.G\[1]\.\.T\>', v:throwpoint)
3597 call assert_match('\<2\>', v:throwpoint)
3600 let exception = v:exception
3601 let throwpoint = v:throwpoint
3602 call assert_equal("", v:exception)
3603 call assert_match('^$', v:throwpoint)
3604 call assert_match('^$', v:throwpoint)
3628 " Test 58: v:exception and v:throwpoint for error/interrupt exceptions {{{1
3630 " v:exception and v:throwpoint work also for error and interrupt
3653 if v:exception !~ 'Vim(delfunction):'
3656 if v:throwpoint !~ '\<T\>'
3659 if v:throwpoint !~ '\<2\>'
3664 if v:exception != ""
3667 if v:throwpoint != ""
3675 if v:exception != ""
3678 if v:throwpoint != ""
3689 if v:exception != 'Vim:Interrupt'
3692 if v:throwpoint !~ 'function T'
3695 if v:throwpoint !~ '\<4\>'
3700 if v:exception != ""
3703 if v:throwpoint != ""
3711 if v:exception != ""
3714 if v:throwpoint != ""
3726 " Test 59: v:exception and v:throwpoint when discarding exceptions {{{1
3729 " interrupt exception, v:exception and v:throwpoint are reset. They
3746 call assert_equal('', v:exception)
3747 call assert_equal('', v:throwpoint)
3755 call assert_equal('', v:exception)
3756 call assert_equal('', v:throwpoint)
3760 call assert_equal('', v:exception)
3761 call assert_equal('', v:throwpoint)
3775 call assert_match('Vim:E492: Not an editor command:', v:exception)
3776 call assert_match('line ' .. (lnum + 1), v:throwpoint)
3783 call assert_equal('', v:exception)
3784 call assert_equal('', v:throwpoint)
3800 call assert_match('Vim:Interrupt', v:exception)
3801 call assert_match('line ' .. (lnum + 1), v:throwpoint)
3808 call assert_equal('', v:exception)
3809 call assert_equal('', v:throwpoint)
3827 call assert_match('Vim(catch):E171: Missing :endif:', v:exception)
3828 call assert_match('line ' .. (lnum + 3), v:throwpoint)
3835 call assert_equal('', v:exception)
3836 call assert_equal('', v:throwpoint)
3852 call assert_equal('', v:exception)
3853 call assert_equal('', v:throwpoint)
3867 call assert_equal('', v:exception)
3868 call assert_equal('', v:throwpoint)
3870 call assert_equal('', v:exception)
3871 call assert_equal('', v:throwpoint)
3885 call assert_match('Vim:E492: Not an editor command:', v:exception)
3886 call assert_match('line ' .. (lnum + 1), v:throwpoint)
3893 call assert_equal('', v:exception)
3894 call assert_equal('', v:throwpoint)
3910 call assert_match('Vim:Interrupt', v:exception)
3911 call assert_match('line ' .. (lnum + 1), v:throwpoint)
3918 call assert_equal('', v:exception)
3919 call assert_equal('', v:throwpoint)
3933 call assert_equal('', v:exception)
3934 call assert_equal('', v:throwpoint)
3938 call assert_match('Vim(finally):E171: Missing :endif:', v:exception)
3939 call assert_match('line ' .. (lnum + 3), v:throwpoint)
3946 call assert_equal('', v:exception)
3947 call assert_equal('', v:throwpoint)
3963 call assert_match('Vim(endtry):E171: Missing :endif:', v:exception)
3964 call assert_match('line ' .. (lnum + 3), v:throwpoint)
3971 call assert_equal('', v:exception)
3972 call assert_equal('', v:throwpoint)
3984 " Test 60: (Re)throwing v:exception; :echoerr. {{{1
3987 " v:exception. An error or interrupt exception cannot be rethrown
3989 " value of v:exception can, however, be triggered by the :echoerr
4001 throw v:exception " rethrow user exception
4023 throw v:exception " throw error: cannot fake Vim exception
4051 let value = substitute(v:exception, '^Vim\((.*)\)\=:', '', "")
4061 call assert_match(value, v:exception)
4082 echoerr substitute(v:exception, '^Vim\((.*)\)\=:', '', "")
4091 call assert_match('Interrupt', v:exception)
4244 let v:errmsg = substitute(v:exception, '^Vim(unlet):', '', "")
4248 call assert_match('E108: No such variable: "novar"', v:errmsg)
4271 let v:errmsg = substitute(v:exception, '^Vim(throw):', '', "")
4275 call assert_match('E121: Undefined variable: novar', v:errmsg)
4298 let v:errmsg = substitute(v:exception, '^Vim(throw):', '', "")
4303 \ v:errmsg)
4331 let v:errmsg = substitute(v:exception, '^Vim(endfunction):', '', "")
4335 call assert_match("E170: Missing :endwhile", v:errmsg)
4364 let v:errmsg = substitute(v:exception, '^Vim:', '', "")
4368 call assert_match("E170: Missing :endwhile", v:errmsg)
4398 let v:errmsg = substitute(v:exception, '^Vim(call):', '', "")
4402 call assert_match("E132: Function call depth is higher than 'maxfuncdepth'", v:errmsg)
4433 let v:errmsg = substitute(v:exception, '^Vim(return):', '', "")
4437 call assert_match("E132: Function call depth is higher than 'maxfuncdepth'", v:errmsg)
4461 " etc. The :silent! has the effect of setting v:errmsg to the error
4480 let v:errmsg = ""
4486 " Check that ":silent!" sets "v:errmsg":
4487 call assert_match("E492: Not an editor command", v:errmsg)
4500 let errmsg3 = substitute(v:exception, '^Vim:', '', "")
4780 call assert_match('Vim(catch):E475: Invalid argument:', v:exception)
4939 let v:errmsg = ""
4951 call assert_equal("", v:errmsg)
4952 let v:errmsg = ""
4967 call assert_equal("", v:errmsg)
4968 let v:errmsg = ""
4985 call assert_equal("", v:errmsg)
4986 let v:errmsg = ""
4999 call assert_equal("", v:errmsg)
5000 let v:errmsg = ""
5010 call assert_equal("", v:errmsg)
5011 let v:errmsg = ""
5047 let v:errmsg = ""
5059 call assert_equal("", v:errmsg)
5060 let v:errmsg = ""
5076 call assert_equal("", v:errmsg)
5077 let v:errmsg = ""
5095 call assert_equal("", v:errmsg)
5096 let v:errmsg = ""
5110 call assert_equal("", v:errmsg)
5111 let v:errmsg = ""
5122 call assert_equal("", v:errmsg)
5157 let g:saved_errmsg = v:errmsg
5177 let errmsg = (a:n >= 37 && a:n <= 44) ? g:saved_errmsg : v:errmsg
5180 let v:errmsg = ""
5184 let v:errmsg = ""
5192 let v{ERR(t) + CONT(t)} = 0
5194 let v{ERR(t) + CONT(t)}
5196 let var = exists('v{ERR(t) + CONT(t)}')
5198 unlet v{ERR(t) + CONT(t)}
5212 " v:errmsg is not set when the error message is converted to an
5214 let v:errmsg = substitute(v:exception, '^Vim:', '', "")
5217 let v:errmsg = ""
5235 let v{INT(t) + CONT(t)} = 0
5237 let v{INT(t) + CONT(t)}
5239 let var = exists('v{INT(t) + CONT(t)}')
5241 unlet v{INT(t) + CONT(t)}
5256 let v:errmsg = substitute(v:exception, '^Vim\((\a\+)\)\=:', '', "")
5274 let v{THR(t) + CONT(t)} = 0
5276 let v{THR(t) + CONT(t)}
5278 let var = exists('v{THR(t) + CONT(t)}')
5280 unlet v{THR(t) + CONT(t)}
5295 let v:errmsg = substitute(v:exception, '^Vim\((\a\+)\)\=:', '', "")
5307 let v{ERR(28) + CONT(28)} = 0
5309 let v{ERR(29) + CONT(29)}
5311 let var = exists('v{ERR(30) + CONT(30)}')
5313 unlet v{ERR(31) + CONT(31)}
5329 let v{WRAP(37, ERRabort(37)) + CONT(37)} = 0
5331 let v{WRAP(38, ERRabort(38)) + CONT(38)}
5333 let var = exists('v{WRAP(39, ERRabort(39)) + CONT(39)}')
5335 unlet v{WRAP(40, ERRabort(40)) + CONT(40)}
5390 let v:errmsg = ""
5394 let v:errmsg = ""
5405 call assert_equal("", v:errmsg)
5410 call assert_equal("", v:errmsg)
5415 call assert_equal("", v:errmsg)
5477 call assert_match('^' .. a:enr .. ':', v:errmsg)
5478 call assert_match(a:emsg, v:errmsg)
5485 let v:errmsg = ""
5490 let v:errmsg = ""
5493 let v{novar + CONT(t)} = 0
5495 let v{novar + CONT(t)}
5497 let var = exists('v{novar + CONT(t)}')
5499 unlet v{novar + CONT(t)}
5512 echo v{novar + CONT(t)}
5518 let var = v{novar + CONT(t)}
5524 " v:errmsg is not set when the error message is converted to an
5526 let v:errmsg = substitute(v:exception, '^Vim\((\a\+)\)\=:', '', "")
5546 let v:errmsg = ""
5551 " v:errmsg is not set when the error message is converted to an
5553 let v:errmsg = substitute(v:exception, '^Vim\((\a\+)\)\=:', '', "")
5605 " "abort" flag). v:errmsg is not set.
5607 " If throwing error exceptions is configured off, v:errmsg is always
5640 let v:errmsg = ""
5644 call assert_match('E121: Undefined variable: novar', v:exception)
5647 call assert_equal("", v:errmsg)
5656 let v:errmsg = ""
5662 call assert_match('E488: Trailing characters', v:exception)
5664 call assert_match('E121: Undefined variable: novar', v:exception)
5668 call assert_equal("", v:errmsg)
5683 let v:errmsg = ""
5687 call assert_match('E475: Invalid argument: {novar}', v:exception)
5690 call assert_equal("", v:errmsg)
5722 let v:errmsg = ""
5728 call assert_match('E584: :elseif after :else', v:errmsg)
5730 let v:errmsg = ""
5736 call assert_match('E584: :elseif after :else', v:errmsg)
5738 let v:errmsg = ""
5741 call assert_match('E582: :elseif without :if', v:errmsg)
5743 let v:errmsg = ""
5748 call assert_match('E582: :elseif without :if', v:errmsg)
5753 let v:errmsg = ""
5760 call assert_match('E584: :elseif after :else', v:exception)
5763 call assert_equal("", v:errmsg)
5776 let v:errmsg = ""
5783 call assert_match('E584: :elseif after :else', v:exception)
5786 call assert_equal("", v:errmsg)
5799 let v:errmsg = ""
5803 call assert_match('E582: :elseif without :if', v:exception)
5806 call assert_equal("", v:errmsg)
5819 let v:errmsg = ""
5825 call assert_match('E582: :elseif without :if', v:exception)
5828 call assert_equal("", v:errmsg)
5902 call assert_match('Xscript, line 7', v:throwpoint)
6007 call assert_match('Xscript, line 6', v:throwpoint)
6044 call assert_match('\.F, line 6', v:throwpoint)
6115 call assert_match('Xscript, line 7', v:throwpoint)
6247 Xpath 'v'
6320 call assert_match("E212: Can't open file for writing", v:exception)
6347 call assert_match('E492: Not an editor command', v:exception)
6381 call assert_match("E484: Can't open file", v:exception)
6413 call assert_match('E492: Not an editor command', v:exception)
6496 call assert_equal(6, type(v:false))
6497 call assert_equal(6, type(v:true))
6498 call assert_equal(7, type(v:none))
6499 call assert_equal(7, type(v:null))
6500 call assert_equal(8, v:t_job)
6501 call assert_equal(9, v:t_channel)
6502 call assert_equal(v:t_number, type(0))
6503 call assert_equal(v:t_string, type(""))
6504 call assert_equal(v:t_func, type(function("tr")))
6505 call assert_equal(v:t_func, type(function("tr", [8])))
6506 call assert_equal(v:t_list, type([]))
6507 call assert_equal(v:t_dict, type({}))
6509 call assert_equal(v:t_float, type(0.0))
6511 call assert_equal(v:t_bool, type(v:false))
6512 call assert_equal(v:t_bool, type(v:true))
6513 call assert_equal(v:t_none, type(v:none))
6514 call assert_equal(v:t_none, type(v:null))
6515 call assert_equal(v:t_string, type(test_null_string()))
6516 call assert_equal(v:t_func, type(test_null_function()))
6517 call assert_equal(v:t_func, type(test_null_partial()))
6518 call assert_equal(v:t_list, type(test_null_list()))
6519 call assert_equal(v:t_dict, type(test_null_dict()))
6521 call assert_equal(v:t_job, type(test_null_job()))
6524 call assert_equal(v:t_channel, type(test_null_channel()))
6526 call assert_equal(v:t_blob, type(test_null_blob()))
6531 call assert_equal(0, 0 + v:false)
6532 call assert_equal(1, 0 + v:true)
6533 call assert_equal(0, 0 + v:none)
6534 call assert_equal(0, 0 + v:null)
6536 call assert_equal('v:false', '' . v:false)
6537 call assert_equal('v:true', '' . v:true)
6538 call assert_equal('v:none', '' . v:none)
6539 call assert_equal('v:null', '' . v:null)
6541 call assert_true(v:false == 0)
6542 call assert_false(v:false != 0)
6543 call assert_true(v:true == 1)
6544 call assert_false(v:true != 1)
6545 call assert_false(v:true == v:false)
6546 call assert_true(v:true != v:false)
6548 call assert_true(v:null == 0)
6549 call assert_false(v:null != 0)
6550 call assert_true(v:none == 0)
6551 call assert_false(v:none != 0)
6553 call assert_true(v:false is v:false)
6554 call assert_true(v:true is v:true)
6555 call assert_true(v:none is v:none)
6556 call assert_true(v:null is v:null)
6558 call assert_false(v:false isnot v:false)
6559 call assert_false(v:true isnot v:true)
6560 call assert_false(v:none isnot v:none)
6561 call assert_false(v:null isnot v:null)
6563 call assert_false(v:false is 0)
6564 call assert_false(v:true is 1)
6565 call assert_false(v:true is v:false)
6566 call assert_false(v:none is 0)
6567 call assert_false(v:null is 0)
6568 call assert_false(v:null is v:none)
6570 call assert_true(v:false isnot 0)
6571 call assert_true(v:true isnot 1)
6572 call assert_true(v:true isnot v:false)
6573 call assert_true(v:none isnot 0)
6574 call assert_true(v:null isnot 0)
6575 call assert_true(v:null isnot v:none)
6577 call assert_equal(v:false, eval(string(v:false)))
6578 call assert_equal(v:true, eval(string(v:true)))
6579 call assert_equal(v:none, eval(string(v:none)))
6580 call assert_equal(v:null, eval(string(v:null)))
6582 call assert_equal(v:false, copy(v:false))
6583 call assert_equal(v:true, copy(v:true))
6584 call assert_equal(v:none, copy(v:none))
6585 call assert_equal(v:null, copy(v:null))
6587 call assert_equal([v:false], deepcopy([v:false]))
6588 call assert_equal([v:true], deepcopy([v:true]))
6589 call assert_equal([v:none], deepcopy([v:none]))
6590 call assert_equal([v:null], deepcopy([v:null]))
6592 call assert_true(empty(v:false))
6593 call assert_false(empty(v:true))
6594 call assert_true(empty(v:null))
6595 call assert_true(empty(v:none))
6599 return v:true
6640 let sp = v:null
7130 call assert_equal(-1, test_refcount(v:true))
7147 let x = v:true
7241 call writefile(['while v:true', 'echo "."'], 'Xscript')
7250 while v:true
7284 let @a = join(repeat(['if v:true'], 51), "\n")
7302 let @a = join(repeat(['while v:true'], 51), "\n")
7312 let @a ..= "\necho v:true\n"
7321 let @a ..= "\necho v:true\n"
7377 call assert_fails('echo 3.2 == v:true', 'E362:')
7378 call assert_fails('echo 3.2 == v:none', 'E907:')
7484 call assert_equal(v:false, eval(string(v:false)))
7491 call assert_equal(v:false, eval(string(v:false)))
7498 call assert_equal(v:false, eval(string(v:false)))