Mercurial > vim
comparison src/testdir/test_debugger.vim @ 28570:35e24d9de858 v8.2.4809
patch 8.2.4809: various things no6 properly tested
Commit: https://github.com/vim/vim/commit/885de449c0c0ef4a8541ed1f5377351844384516
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sat Apr 23 10:51:14 2022 +0100
patch 8.2.4809: various things no6 properly tested
Problem: Various things no6 properly tested.
Solution: Add various test cases. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10259)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 23 Apr 2022 12:00:06 +0200 |
parents | 73f4d1e479f2 |
children | 723c7d940cba |
comparison
equal
deleted
inserted
replaced
28569:ec72a310d1b7 | 28570:35e24d9de858 |
---|---|
360 | 360 |
361 call assert_fails('breakadd here', 'E32:') | 361 call assert_fails('breakadd here', 'E32:') |
362 call assert_fails('breakadd file Xtest.vim /\)/', 'E55:') | 362 call assert_fails('breakadd file Xtest.vim /\)/', 'E55:') |
363 endfunc | 363 endfunc |
364 | 364 |
365 def Test_Debugger_breakadd_expr() | 365 " Test for expression breakpoint set using ":breakadd expr <expr>" |
366 func Test_Debugger_breakadd_expr() | |
367 let lines =<< trim END | |
368 let g:Xtest_var += 1 | |
369 END | |
370 call writefile(lines, 'Xtest.vim') | |
371 | |
372 " Start Vim in a terminal | |
373 let buf = RunVimInTerminal('Xtest.vim', {}) | |
374 call RunDbgCmd(buf, ':let g:Xtest_var = 10') | |
375 call RunDbgCmd(buf, ':breakadd expr g:Xtest_var') | |
376 call RunDbgCmd(buf, ':source %') | |
377 let expected =<< eval trim END | |
378 Oldval = "10" | |
379 Newval = "11" | |
380 `=fnamemodify('Xtest.vim', ':p')` | |
381 line 1: let g:Xtest_var += 1 | |
382 END | |
383 call RunDbgCmd(buf, ':source %', expected) | |
384 call RunDbgCmd(buf, 'cont') | |
385 let expected =<< eval trim END | |
386 Oldval = "11" | |
387 Newval = "12" | |
388 `=fnamemodify('Xtest.vim', ':p')` | |
389 line 1: let g:Xtest_var += 1 | |
390 END | |
391 call RunDbgCmd(buf, ':source %', expected) | |
392 | |
393 call StopVimInTerminal(buf) | |
394 call delete('Xtest.vim') | |
395 endfunc | |
396 | |
397 def Test_Debugger_breakadd_vim9_expr() | |
366 var lines =<< trim END | 398 var lines =<< trim END |
367 vim9script | 399 vim9script |
368 func g:EarlyFunc() | 400 func g:EarlyFunc() |
369 endfunc | 401 endfunc |
370 breakadd expr DoesNotExist() | 402 breakadd expr DoesNotExist() |