Hi,
while working on some more tests, I noticed some bugs. I will report 
them separately, whenever I have a test, that is reproducible 
stand-alone, but until then, I like to disable some tests (and don't 
forget about them).

However, it would be nice, if the logfile could mention, if a test has 
been skipped, and which one.

Therefore here is a patch, that adds this ability. See the commit 
message for an detailed explanation.

Best,
Christian
-- 
Sobald man das Nicht-reden-wollen ausspricht, tut man es ja doch.
                -- Freddy Leitner

-- 
-- 
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.
From 435f71420b03a238b05e4e6a5cf5a79954149ab2 Mon Sep 17 00:00:00 2001
From: Christian Brabandt <[email protected]>
Date: Mon, 29 Aug 2016 11:06:21 +0200
Subject: [PATCH 1/2] Mention the number of skipped tests

Sometimes tests have to be commented, either
because it is not clear how a bug has to be fixed
or because it is not clear, if there is a bug at all.

Therefore, instead of silently skip a test, at least
mention, if a test was skipped.

To do so, one has to explicitly set the g:skipped_test variable
from within your test to the name of the test, that was skipped.

An example looks like this:
  " currently disabled
  " fails currently
  call add(g:skipped_test, 'zc_command in: '. matchstr(expand('<sfile>'), '.*\.\.\zs[^.]*\ze$'))
  " now follows the commented test:
  "norm! zc
  "call assert_equal(1, &foldenable)
  "norm! k

That will output something like this:

From test_normal.vim:
Executing Test_normal01_keymodel()
Executing Test_normal02_selectmode()
Executing Test_normal03_join()
Executing Test_normal04_filter()
Executing Test_normal05_formatexpr()
Executing Test_normal06_formatprg()
Executing Test_normal07_internalfmt()
Executing Test_normal08_fold()
Executing Test_normal09_operatorfunc()
Executing Test_normal10_expand()
Executing Test_normal11_showcmd()
Executing Test_normal12_nv_error()
Executing Test_normal13_help()
Executing Test_normal14_page()
Executing Test_normal15_z_scroll_vert()
Executing Test_normal16_z_scroll_hor()
Executing Test_normal17_z_scroll_hor()
Executing Test_normal18_z_fold()
Executed 18 tests

From test_normal.vim:
Skipped 1 test: zc_command in: Test_normal18_z_fold

Also change test_popup.vim to report, which test was skipped
---
 src/testdir/runtest.vim    | 6 ++++++
 src/testdir/test_popup.vim | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 2660d93..19a2901 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -127,6 +127,7 @@ let s:done = 0
 let s:fail = 0
 let s:errors = []
 let s:messages = []
+let g:skipped_test = [] " number of tests skipped, needs to be set explicitly
 if expand('%') =~ 'test_viml.vim'
   " this test has intentional s:errors, don't use try/catch.
   source %
@@ -156,11 +157,13 @@ endif
 
 " Execute the tests in alphabetical order.
 for s:test in sort(s:tests)
+  let g:skipped_test = []
   call RunTheTest(s:test)
 
   if len(v:errors) > 0 && index(s:flaky, s:test) >= 0
     call add(s:messages, 'Flaky test failed, running it again')
     let v:errors = []
+    let g:skipped_test = []
     call RunTheTest(s:test)
   endif
 
@@ -170,6 +173,9 @@ for s:test in sort(s:tests)
     call extend(s:errors, v:errors)
     let v:errors = []
   endif
+  if len(g:skipped_test) > 0
+    call add(s:errors, printf('Skipped %d %s: %s', len(g:skipped_test), len(g:skipped_test) > 1 ? 'tests' : 'test', join(g:skipped_test, ' ')))
+  endif
 endfor
 
 " Don't write viminfo on exit.
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 34a2251..0460bd8 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -171,6 +171,9 @@ func! Test_popup_complete()
   " Insert match immediately, if there is only one match
   "  <c-e> Should select a character from the line below
   " TODO: test disabled because the code change has been reverted.
+  " Disabled in Patch 7.4.2188
+  call add(g:skipped_test, '<c-e>_popupmenu in: '. matchstr(expand('<sfile>'), '.*\.\.\zs[^.]*\ze$'))
+
   " call append(1, ["December2015"])
   " :1
   " call feedkeys("aD\<f5>\<C-E>\<C-E>\<C-E>\<C-E>\<enter>\<esc>", 'tx')
-- 
2.1.4

Raspunde prin e-mail lui