annotate src/testdir/color_ramp.vim @ 14239:7457bf2db968 v8.1.0136

patch 8.1.0136: Lua tests don't cover new features commit https://github.com/vim/vim/commit/2f362bf7f9acc9ec87799d1e41bf0ae7712d1f7a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 1 19:49:27 2018 +0200 patch 8.1.0136: Lua tests don't cover new features Problem: Lua tests don't cover new features. Solution: Add more tests. (Dominique Pelle, closes https://github.com/vim/vim/issues/3130)
author Christian Brabandt <cb@256bit.org>
date Sun, 01 Jul 2018 20:00:09 +0200
parents 2d54f1e7ba0f
children 89364104be93
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12944
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Script to generate a file that shows al 256 xterm colors
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 new
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 call setline(1, 'ANSI')
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 " ANSI colors
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 let s = ''
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 for nr in range(0, 7)
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 let s .= "\033[4" . nr . "m "
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 endfor
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 for nr in range(8, 15)
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 let s .= "\033[10" . (nr - 8) . "m "
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 endfor
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 " Add | in original color pair to see white background.
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 let s .= "\033[m|"
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 call setline(2, s)
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 " 6 x 6 x 6 color cube
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 call setline(3, 'color cube')
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 for high in range(0, 5)
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 let s = ''
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 for low in range(0, 35)
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 let nr = low + high * 36
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 let s .= "\033[48;5;" . (nr + 16) . "m "
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 endfor
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 let s .= "\033[m|"
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 call setline(high + 4, s)
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 endfor
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 " 24 shades of grey
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 call setline(10, 'grey ramp')
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 let s = ''
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 for nr in range(0, 23)
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 let s .= "\033[48;5;" . (nr + 232) . "m "
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 endfor
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 let s .= "\033[m|"
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 call setline(11, s)
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 set binary
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 write! <sfile>:h/color_ramp.txt
2d54f1e7ba0f patch 8.0.1348: make testclean deletes script file on MS-Windows
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 quit