Hi,

Attached is a tiny, trivial supplement to test_gui.  Any comments and/or
suggestions are welcome, as you all know, I'm not used to writing new tests
for Vim :)

Best regards,
Kazunobu Kuriyama

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/testdir/test_gui.vim b/src/testdir/test_gui.vim
index 14c0ca1f4..367c8499c 100644
--- a/src/testdir/test_gui.vim
+++ b/src/testdir/test_gui.vim
@@ -4,6 +4,8 @@ if !has('gui') || ($DISPLAY == "" && !has('gui_running'))
   finish
 endif
 
+let s:x11_based_gui = has('gui_athena') || has('gui_motif') || has('gui_gtk2') 
|| has('gui_gnome') || has('gui_gtk3')
+
 " For KDE set a font, empty 'guifont' may cause a hang.
 func SetUp()
   if has("gui_kde")
@@ -32,6 +34,11 @@ func Test_1_set_secure()
   call assert_equal(1, has('gui_running'))
 endfunc
 
+func Test_function()
+  call assert_true(1, match(execute('echo getwinposx()'), 
'\(%-1\)\|\(%\d\+\)') >= 0)
+  call assert_true(1, match(execute('echo getwinposy()'), 
'\(%-1\)\|\(%\d\+\)') >= 0)
+endfunction
+
 func Test_shell_command()
   new
   r !echo hello
@@ -39,3 +46,11 @@ func Test_shell_command()
   bwipe!
   call assert_true(1, match(execute('winpos'), 'Window position: X \d\+, Y 
\d\+') >= 0)
 endfunc
+
+func Test_vim_variable()
+  if s:x11_based_gui
+    call assert_true(1, match(execute('echo v:windowid'), '\d\+') >= 0)
+  else
+    call assert_equal(0, v:windowid)
+  endif
+endfunction

Raspunde prin e-mail lui