Mercurial > vim
comparison src/testdir/test_syntax.vim @ 13329:424321d6eea7 v8.0.1539
patch 8.0.1539: no test for the popup menu positioning
commit https://github.com/vim/vim/commit/6bb2cdfe604e51eec216cbe23bb6e8fb47810347
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 24 19:53:53 2018 +0100
patch 8.0.1539: no test for the popup menu positioning
Problem: No test for the popup menu positioning.
Solution: Add a screendump test for the popup menu.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 24 Feb 2018 20:00:07 +0100 |
parents | 0dc2e4998a15 |
children | 7cac4646c552 |
comparison
equal
deleted
inserted
replaced
13328:2c639a9a4def | 13329:424321d6eea7 |
---|---|
3 if !has("syntax") | 3 if !has("syntax") |
4 finish | 4 finish |
5 endif | 5 endif |
6 | 6 |
7 source view_util.vim | 7 source view_util.vim |
8 if has('terminal') | 8 source screendump.vim |
9 source screendump.vim | |
10 endif | |
11 | 9 |
12 func GetSyntaxItem(pat) | 10 func GetSyntaxItem(pat) |
13 let c = '' | 11 let c = '' |
14 let a = ['a', getreg('a'), getregtype('a')] | 12 let a = ['a', getreg('a'), getregtype('a')] |
15 0 | 13 0 |
526 bw! | 524 bw! |
527 endfunc | 525 endfunc |
528 | 526 |
529 " Check highlighting for a small piece of C code with a screen dump. | 527 " Check highlighting for a small piece of C code with a screen dump. |
530 func Test_syntax_c() | 528 func Test_syntax_c() |
531 " Need to be able to run terminal Vim with 256 colors. | 529 if !CanRunVimInTerminal() |
532 " On MS-Windows the console only has 16 colors and the GUI can't run in a | |
533 " terminal. | |
534 if !has('terminal') || has('win32') | |
535 return | 530 return |
536 endif | 531 endif |
537 call writefile([ | 532 call writefile([ |
538 \ '/* comment line at the top */', | 533 \ '/* comment line at the top */', |
539 \ ' int', | 534 \ ' int', |
559 " This makes the default for 'background' use "dark", check that the | 554 " This makes the default for 'background' use "dark", check that the |
560 " response to t_RB corrects it to "light". | 555 " response to t_RB corrects it to "light". |
561 let $COLORFGBG = '15;0' | 556 let $COLORFGBG = '15;0' |
562 | 557 |
563 let buf = RunVimInTerminal('Xtest.c', {}) | 558 let buf = RunVimInTerminal('Xtest.c', {}) |
564 call VerifyScreenDump(buf, 'Test_syntax_c_01') | 559 call VerifyScreenDump(buf, 'Test_syntax_c_01', {}) |
565 call StopVimInTerminal(buf) | 560 call StopVimInTerminal(buf) |
566 | 561 |
567 let $COLORFGBG = '' | 562 let $COLORFGBG = '' |
568 call delete('Xtest.c') | 563 call delete('Xtest.c') |
569 endfun | 564 endfun |