summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/Make_all.mak3
-rw-r--r--src/testdir/Make_vms.mms4
-rw-r--r--src/testdir/test16.in16
-rw-r--r--src/testdir/test16.ok2
-rw-r--r--src/testdir/test_gui.vim28
5 files changed, 32 insertions, 21 deletions
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 2965b708d..9493ccb40 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -154,7 +154,7 @@ SCRIPTS_WIN32 = test50.out
# Tests for the GUI.
-SCRIPTS_GUI = test16.out
+SCRIPTS_GUI =
# Tests using runtest.vim.vim.
@@ -171,6 +171,7 @@ NEW_TESTS = test_arglist.res \
test_digraph.res \
test_farsi.res \
test_gn.res \
+ test_gui.res \
test_hardcopy.res \
test_history.res \
test_increment.res \
diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms
index ca4fceebd..5ce32aaa1 100644
--- a/src/testdir/Make_vms.mms
+++ b/src/testdir/Make_vms.mms
@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# 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.
# Edit the lines in the Configuration section below to select.
@@ -104,7 +104,7 @@ SCRIPT = $(SCRIPTS_ALL) $(SCRIPTS_MORE3)
# On ODS-2 tests fail.
.IFDEF WANT_GUI
-SCRIPT_GUI = test16.out
+SCRIPT_GUI =
GUI_OPTION = -g
.ENDIF
diff --git a/src/testdir/test16.in b/src/testdir/test16.in
deleted file mode 100644
index 760ac675c..000000000
--- a/src/testdir/test16.in
+++ /dev/null
@@ -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
diff --git a/src/testdir/test16.ok b/src/testdir/test16.ok
deleted file mode 100644
index 25e2eea5c..000000000
--- a/src/testdir/test16.ok
+++ /dev/null
@@ -1,2 +0,0 @@
-
- just some text
diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim
new file mode 100644
index 000000000..cd698e37a
--- /dev/null
+++ b/src/testdir/test_gui.vim
@@ -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