Mercurial > vim
annotate src/testdir/test_gui.vim @ 9798:e34e4547f3d1 v7.4.2174
commit https://github.com/vim/vim/commit/c8ce615299b4d8c1b2e6cf83496f48cd497d8a37
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 7 13:48:20 2016 +0200
patch 7.4.2174
Problem: Adding duplicate flags to 'whichwrap' leaves commas behind.
Solution: Also remove the commas. (Naruhiko Nishino)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 07 Aug 2016 14:00:06 +0200 |
parents | 96667173293d |
children | 6049c1f01391 |
rev | line source |
---|---|
9756
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests specifically for the GUI |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 if !has('gui') || ($DISPLAY == "" && !has('gui_running')) |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 finish |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 endif |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 " For KDE set a font, empty 'guifont' may cause a hang. |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 func SetUp() |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 if has("gui_kde") |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0 |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 endif |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 endfunc |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 " Test for resetting "secure" flag after GUI has started. |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 " Must be run first. |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 func Test_1_set_secure() |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 set exrc secure |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 gui -f |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 call assert_equal(1, has('gui_running')) |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 endfunc |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 func Test_shell_command() |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 new |
9760
96667173293d
commit https://github.com/vim/vim/commit/9d5b876d458e242b8b5e44da10c5cdc6bbb7f57c
Christian Brabandt <cb@256bit.org>
parents:
9756
diff
changeset
|
24 r !echo hello |
96667173293d
commit https://github.com/vim/vim/commit/9d5b876d458e242b8b5e44da10c5cdc6bbb7f57c
Christian Brabandt <cb@256bit.org>
parents:
9756
diff
changeset
|
25 call assert_equal('hello', substitute(getline(2), '\W', '', 'g')) |
9756
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 bwipe! |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 call assert_true(1, match(execute('winpos'), 'Window position: X \d\+, Y \d\+') >= 0) |
00d753ea19a9
commit https://github.com/vim/vim/commit/877e95779869c5426102aa491f67d99904c8534c
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 endfunc |