Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | Tests for ":highlight". vim: set ft=vim : |
| 2 | |
| 3 | STARTTEST |
| 4 | :so small.vim |
| 5 | :" basic test if ":highlight" doesn't crash |
| 6 | :highlight |
| 7 | :hi Search |
| 8 | :" test setting colors. |
| 9 | :" test clearing one color and all doesn't generate error or warning |
| 10 | :hi NewGroup term=bold cterm=italic ctermfg=DarkBlue ctermbg=Grey gui= guifg=#00ff00 guibg=Cyan |
| 11 | :hi Group2 term= cterm= |
| 12 | :hi Group3 term=underline cterm=bold |
Bram Moolenaar | a5792f5 | 2005-11-23 21:25:05 +0000 | [diff] [blame] | 13 | :redir! >test.out |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 14 | :hi NewGroup |
| 15 | :hi Group2 |
| 16 | :hi Group3 |
| 17 | :hi clear NewGroup |
| 18 | :hi NewGroup |
| 19 | :hi Group2 |
| 20 | :hi Group2 NONE |
| 21 | :hi Group2 |
| 22 | :hi clear |
| 23 | :hi Group3 |
| 24 | :hi Crash term='asdf |
| 25 | :redir END |
| 26 | :" filter ctermfg and ctermbg, the numbers depend on the terminal |
Bram Moolenaar | 3e8474d | 2016-10-12 17:52:42 +0200 | [diff] [blame] | 27 | :e! test.out |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 28 | :%s/ctermfg=\d*/ctermfg=2/ |
| 29 | :%s/ctermbg=\d*/ctermbg=3/ |
| 30 | :" filter out possibly translated error message |
| 31 | :%s/E475: [^:]*:/E475:/ |
Bram Moolenaar | ce0842a | 2005-07-18 21:58:11 +0000 | [diff] [blame] | 32 | :" fix the fileformat |
| 33 | :set ff& |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 34 | :wq! |
| 35 | ENDTEST |
| 36 | |