On Di, 30 Aug 2016, Christian Brabandt wrote:
> Hm, let's try the second approach for the test_popup.vim
>
> Will submit a patch soon.
How about the attached patch?
Best,
Christian
--
Jeder Weg führt zum Glück. Die Frage ist, wieviel Trauer
auf dem Weg liegt.
-- Benjamin Stramke
--
--
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/Makefile b/src/testdir/Makefile
index 2153039..08f11cd 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -121,7 +121,7 @@ nolog:
RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(VIMPROG) -f $(GUI_FLAG) -u unix.vim $(NO_PLUGIN)
newtests: newtestssilent
- @/bin/sh -c "if test -f messages && grep -q 'FAILED' messages; then cat messages && cat test.log; fi"
+ @/bin/sh -c "if test -f messages && grep -q 'SKIPPED\|FAILED' messages; then cat messages && if test -f test.log; then cat test.log; fi ; fi"
newtestssilent: $(NEW_TESTS)
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 2660d93..2b23aed 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -86,6 +86,10 @@ function GetAllocId(name)
return lnum - top - 1
endfunc
+func ListSort(i1, i2)
+ return a:i1 =~# '^SKIPPED' ? 1 : 0
+endfunc
+
function RunTheTest(test)
echo 'Executing ' . a:test
if exists("*SetUp")
@@ -96,6 +100,9 @@ function RunTheTest(test)
let s:done += 1
try
exe 'call ' . a:test
+ catch /^\cskip/
+ "call add(s:messages, 'Skipping test: ' . a:test . ': ' . matchstr(v:exception, 'skipp.*\>\s*\zs'))
+ call add(s:messages, 'SKIPPED ' . a:test . ': ' . join(split(v:exception, '\s\+')[1:], ' '))
catch
call add(v:errors, 'Caught exception in ' . a:test . ': ' . v:exception . ' @ ' . v:throwpoint)
endtry
@@ -201,6 +208,7 @@ if s:fail > 0
endif
" Append messages to "messages"
+call sort(s:messages, "ListSort")
split messages
call append(line('$'), '')
call append(line('$'), 'From ' . g:testname . ':')
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index 34a2251..dd94933 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -16,6 +16,21 @@ func! ListMonths()
return ''
endfunc
+func! Test_popup_complete2()
+ " 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.
+ throw "Skipped: Bug with <c-e> and popupmenu not fixed yet"
+ new
+ inoremap <f5> <c-r>=ListMonths()<cr>
+ call append(1, ["December2015"])
+ :1
+ call feedkeys("aD\<f5>\<C-E>\<C-E>\<C-E>\<C-E>\<enter>\<esc>", 'tx')
+ call assert_equal(["December2015", "", "December2015"], getline(1,3))
+ %d
+ bw!
+endfu
+
func! Test_popup_complete()
new
inoremap <f5> <c-r>=ListMonths()<cr>
@@ -168,15 +183,6 @@ func! Test_popup_complete()
call assert_equal(["December2015", "December2015", ""], getline(1,3))
%d
- " 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.
- " call append(1, ["December2015"])
- " :1
- " call feedkeys("aD\<f5>\<C-E>\<C-E>\<C-E>\<C-E>\<enter>\<esc>", 'tx')
- " call assert_equal(["December2015", "", "December2015"], getline(1,3))
- " %d
-
" use menuone for 'completeopt'
" Since for the first <c-y> the menu is still shown, will only select
" three letters from the line above