forked from aniani/vim
patch 7.4.2153
Problem: GUI test isn't testing much. Solution: Turn into a new style test. Execute a shell command.
This commit is contained in:
@@ -2039,7 +2039,7 @@ test1 \
|
|||||||
test_wordcount \
|
test_wordcount \
|
||||||
test_writefile \
|
test_writefile \
|
||||||
test2 test3 test4 test5 test6 test7 test8 test9 \
|
test2 test3 test4 test5 test6 test7 test8 test9 \
|
||||||
test11 test12 test13 test14 test15 test16 test17 test18 test19 \
|
test11 test12 test13 test14 test15 test17 test18 test19 \
|
||||||
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
|
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
|
||||||
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
|
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
|
||||||
test40 test41 test42 test43 test44 test45 test46 test48 test49 \
|
test40 test41 test42 test43 test44 test45 test46 test48 test49 \
|
||||||
@@ -2080,6 +2080,7 @@ test_arglist \
|
|||||||
test_glob2regpat \
|
test_glob2regpat \
|
||||||
test_gn \
|
test_gn \
|
||||||
test_goto \
|
test_goto \
|
||||||
|
test_gui \
|
||||||
test_hardcopy \
|
test_hardcopy \
|
||||||
test_help_tagjump \
|
test_help_tagjump \
|
||||||
test_history \
|
test_history \
|
||||||
|
@@ -154,7 +154,7 @@ SCRIPTS_WIN32 = test50.out
|
|||||||
|
|
||||||
|
|
||||||
# Tests for the GUI.
|
# Tests for the GUI.
|
||||||
SCRIPTS_GUI = test16.out
|
SCRIPTS_GUI =
|
||||||
|
|
||||||
|
|
||||||
# Tests using runtest.vim.vim.
|
# Tests using runtest.vim.vim.
|
||||||
@@ -171,6 +171,7 @@ NEW_TESTS = test_arglist.res \
|
|||||||
test_digraph.res \
|
test_digraph.res \
|
||||||
test_farsi.res \
|
test_farsi.res \
|
||||||
test_gn.res \
|
test_gn.res \
|
||||||
|
test_gui.res \
|
||||||
test_hardcopy.res \
|
test_hardcopy.res \
|
||||||
test_history.res \
|
test_history.res \
|
||||||
test_increment.res \
|
test_increment.res \
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
|
||||||
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
|
||||||
#
|
#
|
||||||
# Last change: 2016 Feb 25
|
# Last change: 2016 Aug 04
|
||||||
#
|
#
|
||||||
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
|
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
|
||||||
# Edit the lines in the Configuration section below to select.
|
# Edit the lines in the Configuration section below to select.
|
||||||
@@ -104,7 +104,7 @@ SCRIPT = $(SCRIPTS_ALL) $(SCRIPTS_MORE3)
|
|||||||
# On ODS-2 tests fail.
|
# On ODS-2 tests fail.
|
||||||
|
|
||||||
.IFDEF WANT_GUI
|
.IFDEF WANT_GUI
|
||||||
SCRIPT_GUI = test16.out
|
SCRIPT_GUI =
|
||||||
GUI_OPTION = -g
|
GUI_OPTION = -g
|
||||||
.ENDIF
|
.ENDIF
|
||||||
|
|
||||||
|
@@ -1,16 +0,0 @@
|
|||||||
Tests for resetting "secure" flag after GUI has started.
|
|
||||||
For KDE set a font, empty 'guifont' may cause a hang.
|
|
||||||
|
|
||||||
STARTTEST
|
|
||||||
:so small.vim
|
|
||||||
:if $DISPLAY == "" | e! test.ok | wq! test.out | endif
|
|
||||||
:set exrc secure
|
|
||||||
:if has("gui_kde")
|
|
||||||
: set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0
|
|
||||||
:endif
|
|
||||||
:gui -f
|
|
||||||
:.,$w! test.out
|
|
||||||
:qa!
|
|
||||||
ENDTEST
|
|
||||||
|
|
||||||
just some text
|
|
@@ -1,2 +0,0 @@
|
|||||||
|
|
||||||
just some text
|
|
28
src/testdir/test_gui.vim
Normal file
28
src/testdir/test_gui.vim
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
" Tests specifically for the GUI
|
||||||
|
|
||||||
|
if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" For KDE set a font, empty 'guifont' may cause a hang.
|
||||||
|
func SetUp()
|
||||||
|
if has("gui_kde")
|
||||||
|
set guifont=Courier\ 10\ Pitch/8/-1/5/50/0/0/0/0/0
|
||||||
|
endif
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" Test for resetting "secure" flag after GUI has started.
|
||||||
|
" Must be run first.
|
||||||
|
func Test_1_set_secure()
|
||||||
|
set exrc secure
|
||||||
|
gui -f
|
||||||
|
call assert_equal(1, has('gui_running'))
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func Test_shell_command()
|
||||||
|
new
|
||||||
|
r !echo 'hello'
|
||||||
|
call assert_equal('hello', getline(2))
|
||||||
|
bwipe!
|
||||||
|
call assert_true(1, match(execute('winpos'), 'Window position: X \d\+, Y \d\+') >= 0)
|
||||||
|
endfunc
|
@@ -763,6 +763,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2153,
|
||||||
/**/
|
/**/
|
||||||
2152,
|
2152,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user