Skip to content

Commit 877e957

Browse files
committed
patch 7.4.2153
Problem: GUI test isn't testing much. Solution: Turn into a new style test. Execute a shell command.
1 parent ee695f7 commit 877e957

File tree

7 files changed

+36
-22
lines changed

7 files changed

+36
-22
lines changed

src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2039,7 +2039,7 @@ test1 \
20392039
test_wordcount \
20402040
test_writefile \
20412041
test2 test3 test4 test5 test6 test7 test8 test9 \
2042-
test11 test12 test13 test14 test15 test16 test17 test18 test19 \
2042+
test11 test12 test13 test14 test15 test17 test18 test19 \
20432043
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
20442044
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
20452045
test40 test41 test42 test43 test44 test45 test46 test48 test49 \
@@ -2080,6 +2080,7 @@ test_arglist \
20802080
test_glob2regpat \
20812081
test_gn \
20822082
test_goto \
2083+
test_gui \
20832084
test_hardcopy \
20842085
test_help_tagjump \
20852086
test_history \

src/testdir/Make_all.mak

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ SCRIPTS_WIN32 = test50.out
154154

155155

156156
# Tests for the GUI.
157-
SCRIPTS_GUI = test16.out
157+
SCRIPTS_GUI =
158158

159159

160160
# Tests using runtest.vim.vim.
@@ -171,6 +171,7 @@ NEW_TESTS = test_arglist.res \
171171
test_digraph.res \
172172
test_farsi.res \
173173
test_gn.res \
174+
test_gui.res \
174175
test_hardcopy.res \
175176
test_history.res \
176177
test_increment.res \

src/testdir/Make_vms.mms

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Authors: Zoltan Arpadffy, <[email protected]>
55
# Sandor Kopanyi, <[email protected]>
66
#
7-
# Last change: 2016 Feb 25
7+
# Last change: 2016 Aug 04
88
#
99
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
1010
# Edit the lines in the Configuration section below to select.
@@ -104,7 +104,7 @@ SCRIPT = $(SCRIPTS_ALL) $(SCRIPTS_MORE3)
104104
# On ODS-2 tests fail.
105105

106106
.IFDEF WANT_GUI
107-
SCRIPT_GUI = test16.out
107+
SCRIPT_GUI =
108108
GUI_OPTION = -g
109109
.ENDIF
110110

src/testdir/test16.in

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/testdir/test16.ok

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/testdir/test_gui.vim

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
" Tests specifically for the GUI
2+
3+
if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
4+
finish
5+
endif
6+
7+
" For KDE set a font, empty 'guifont' may cause a hang.
8+
func SetUp()
9+
if has("gui_kde")
10+
set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0
11+
endif
12+
endfunc
13+
14+
" Test for resetting "secure" flag after GUI has started.
15+
" Must be run first.
16+
func Test_1_set_secure()
17+
set exrc secure
18+
gui -f
19+
call assert_equal(1, has('gui_running'))
20+
endfunc
21+
22+
func Test_shell_command()
23+
new
24+
r !echo 'hello'
25+
call assert_equal('hello', getline(2))
26+
bwipe!
27+
call assert_true(1, match(execute('winpos'), 'Window position: X \d\+, Y \d\+') >= 0)
28+
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ static char *(features[]) =
763763

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
2153,
766768
/**/
767769
2152,
768770
/**/

0 commit comments

Comments
 (0)