diff options
| author | Daniel Hahler <git@thequod.de> | 2019-08-22 06:37:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-22 06:37:05 +0200 |
| commit | bb50eadc84a4d095b1739ad31720fafe7bca6d0f (patch) | |
| tree | 998c55e4dd1ca3da0bc5acc2f72996f9470f2d73 /src/nvim/testdir | |
| parent | 42f492ac99058bd1cd56c3c7871e7e464b2a5e24 (diff) | |
| parent | 86d88076ceeef20301b06fd69a8f98c73cffe9c6 (diff) | |
| download | rneovim-bb50eadc84a4d095b1739ad31720fafe7bca6d0f.tar.gz rneovim-bb50eadc84a4d095b1739ad31720fafe7bca6d0f.tar.bz2 rneovim-bb50eadc84a4d095b1739ad31720fafe7bca6d0f.zip | |
Merge pull request #10815 from blueyed/vim-8.1.1483
vim-patch:8.1.1483: skipped tests are not properly listed
Diffstat (limited to 'src/nvim/testdir')
45 files changed, 163 insertions, 216 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 90381d9116..03b1bae28f 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -86,15 +86,14 @@ nongui: nolog $(FIXFF) $(SCRIPTS) newtests report @echo 'set $$_exitcode = -1\nrun\nif $$_exitcode != -1\n quit\nend' > .gdbinit report: + $(RUN_VIMTEST) $(NO_INITS) -u NONE -S summarize.vim messages @echo @echo 'Test results:' - @/bin/sh -c "if test -f test.log; then \ - cat test.log; \ - echo TEST FAILURE; \ - exit 1; \ - else \ - echo ALL DONE; \ - fi" + @cat test_result.log + @/bin/sh -c "if test -f test.log; \ + then echo TEST FAILURE; exit 1; \ + else echo ALL DONE; \ + fi" test1.out: $(NVIM_PRG) @@ -124,6 +123,7 @@ CLEAN_FILES := *.out \ *.orig \ *.tlog \ test.log \ + test_result.log \ messages \ $(RM_ON_RUN) \ $(RM_ON_START) \ @@ -163,7 +163,7 @@ nolog: # New style of tests uses Vim script with assert calls. These are easier # to write and a lot easier to read and debug. # Limitation: Only works with the +eval feature. -RUN_VIMTEST = $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --headless --noplugin +RUN_VIMTEST = $(TOOL) $(NVIM_PRG) -u unix.vim newtests: newtestssilent @/bin/sh -c "if test -f messages && grep -q 'FAILED' messages; then \ @@ -176,4 +176,4 @@ newtestssilent: $(NEW_TESTS) @echo "[OLDTEST] Running" $* @rm -rf $*.failed test.ok $(RM_ON_RUN) @mkdir -p $(TMPDIR) - @/bin/sh runnvim.sh $(ROOT) $(NVIM_PRG) $* $(RUN_VIMTEST) -u NONE -S runtest.vim $*.vim + @/bin/sh runnvim.sh $(ROOT) $(NVIM_PRG) $* $(RUN_VIMTEST) $(NO_INITS) -u NONE -S runtest.vim $*.vim diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 8b949d434e..fa25740994 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -51,13 +51,9 @@ source setup.vim " This also enables use of line continuation. set nocp viminfo+=nviminfo -" Use utf-8 or latin1 by default, instead of whatever the system default -" happens to be. Individual tests can overrule this at the top of the file. -if has('multi_byte') - set encoding=utf-8 -else - set encoding=latin1 -endif +" Use utf-8 by default, instead of whatever the system default happens to be. +" Individual tests can overrule this at the top of the file. +set encoding=utf-8 " REDIR_TEST_TO_NULL has a very permissive SwapExists autocommand which is for " the test_name.vim file itself. Replace it here with a more restrictive one, @@ -272,6 +268,9 @@ if expand('%') =~ 'test_vimscript.vim' else try source % + catch /^\cskipped/ + call add(s:messages, ' Skipped') + call add(s:skipped, 'SKIPPED ' . expand('%') . ': ' . substitute(v:exception, '^\S*\s\+', '', '')) catch let s:fail += 1 call add(s:errors, 'Caught exception: ' . v:exception . ' @ ' . v:throwpoint) diff --git a/src/nvim/testdir/summarize.vim b/src/nvim/testdir/summarize.vim new file mode 100644 index 0000000000..4a88935a40 --- /dev/null +++ b/src/nvim/testdir/summarize.vim @@ -0,0 +1,56 @@ +if 1 + " This is executed only with the eval feature + set nocompatible + func Count(match, type) + if a:type ==# 'executed' + let g:executed += (a:match+0) + elseif a:type ==# 'failed' + let g:failed += a:match+0 + elseif a:type ==# 'skipped' + let g:skipped += 1 + call extend(g:skipped_output, ["\t".a:match]) + endif + endfunc + + let g:executed = 0 + let g:skipped = 0 + let g:failed = 0 + let g:skipped_output = [] + let g:failed_output = [] + let output = [""] + + try + " This uses the :s command to just fetch and process the output of the + " tests, it doesn't acutally replace anything. + " And it uses "silent" to avoid reporting the number of matches. + silent %s/^Executed\s\+\zs\d\+\ze\s\+tests/\=Count(submatch(0),'executed')/egn + silent %s/^SKIPPED \zs.*/\=Count(submatch(0), 'skipped')/egn + silent %s/^\(\d\+\)\s\+FAILED:/\=Count(submatch(1), 'failed')/egn + + call extend(output, ["Skipped:"]) + call extend(output, skipped_output) + + call extend(output, [ + \ "", + \ "-------------------------------", + \ printf("Executed: %5d Tests", g:executed), + \ printf(" Skipped: %5d Tests", g:skipped), + \ printf(" %s: %5d Tests", g:failed == 0 ? 'Failed' : 'FAILED', g:failed), + \ "", + \ ]) + if filereadable('test.log') + " outputs and indents the failed test result + call extend(output, ["", "Failures: "]) + let failed_output = filter(readfile('test.log'), { v,k -> !empty(k)}) + call extend(output, map(failed_output, { v,k -> "\t".k})) + " Add a final newline + call extend(output, [""]) + endif + + catch " Catch-all + finally + call writefile(output, 'test_result.log') " overwrites an existing file + endtry +endif + +q! diff --git a/src/nvim/testdir/test_alot_utf8.vim b/src/nvim/testdir/test_alot_utf8.vim index 648d806a94..be0bd01413 100644 --- a/src/nvim/testdir/test_alot_utf8.vim +++ b/src/nvim/testdir/test_alot_utf8.vim @@ -2,8 +2,7 @@ " This makes testing go faster, since Vim doesn't need to restart. " These tests use utf8 'encoding'. Setting 'encoding' is already done in -" runtest.vim. Checking for the multi_byte feature is in the individual -" files, so that they can be run by themselves. +" runtest.vim. source test_charsearch_utf8.vim source test_expr_utf8.vim diff --git a/src/nvim/testdir/test_arabic.vim b/src/nvim/testdir/test_arabic.vim index d67f875f97..450c6f98f5 100644 --- a/src/nvim/testdir/test_arabic.vim +++ b/src/nvim/testdir/test_arabic.vim @@ -2,8 +2,8 @@ " NOTE: This just checks if the code works. If you know Arabic please add " functional tests that check the shaping works with real text. -if !has('arabic') || !has('multi_byte') - finish +if !has('arabic') + throw 'Skipped: arabic feature missing' endif source view_util.vim diff --git a/src/nvim/testdir/test_autochdir.vim b/src/nvim/testdir/test_autochdir.vim index 05d69631c4..67c537b407 100644 --- a/src/nvim/testdir/test_autochdir.vim +++ b/src/nvim/testdir/test_autochdir.vim @@ -1,7 +1,7 @@ " Test 'autochdir' behavior if !exists("+autochdir") - finish + throw 'Skipped: autochdir feature missing' endif func Test_set_filename() diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim index 7deffbe452..4b34420cab 100644 --- a/src/nvim/testdir/test_breakindent.vim +++ b/src/nvim/testdir/test_breakindent.vim @@ -5,7 +5,7 @@ " It helps to change the tabstop setting and force a redraw (e.g. see " Test_breakindent08()) if !exists('+breakindent') - finish + throw 'Skipped: breakindent option not supported' endif source view_util.vim diff --git a/src/nvim/testdir/test_charsearch_utf8.vim b/src/nvim/testdir/test_charsearch_utf8.vim index ade7dd408c..eac5d46ad8 100644 --- a/src/nvim/testdir/test_charsearch_utf8.vim +++ b/src/nvim/testdir/test_charsearch_utf8.vim @@ -1,7 +1,4 @@ " Tests for related f{char} and t{char} using utf-8. -if !has('multi_byte') - finish -endif " Test for t,f,F,T movement commands function! Test_search_cmds() diff --git a/src/nvim/testdir/test_clientserver.vim b/src/nvim/testdir/test_clientserver.vim index 02840de743..46ac59b3b1 100644 --- a/src/nvim/testdir/test_clientserver.vim +++ b/src/nvim/testdir/test_clientserver.vim @@ -1,7 +1,7 @@ " Tests for the +clientserver feature. if !has('job') || !has('clientserver') - finish + throw 'Skipped: job and/or clientserver feature missing' endif source shared.vim diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 4b333e444a..b8b018d5f7 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -568,7 +568,8 @@ func Test_setcmdpos() endfunc func Test_cmdline_overstrike() - let encodings = has('multi_byte') ? [ 'utf8' ] : [ 'latin1' ] + " Nvim: only utf8 is supported. + let encodings = ['utf8'] let encoding_save = &encoding for e in encodings @@ -587,11 +588,9 @@ func Test_cmdline_overstrike() call assert_equal('"ab0cd3ef4', @:) endfor - if has('multi_byte') - " Test overstrike with multi-byte characters. - call feedkeys(":\"テキストエディタ\<home>\<right>\<right>ab\<right>\<insert>cd\<enter>", 'xt') - call assert_equal('"テabキcdエディタ', @:) - endif + " Test overstrike with multi-byte characters. + call feedkeys(":\"テキストエディタ\<home>\<right>\<right>ab\<right>\<insert>cd\<enter>", 'xt') + call assert_equal('"テabキcdエディタ', @:) let &encoding = encoding_save endfunc diff --git a/src/nvim/testdir/test_debugger.vim b/src/nvim/testdir/test_debugger.vim index bb87ef9c58..3ef460b4fe 100644 --- a/src/nvim/testdir/test_debugger.vim +++ b/src/nvim/testdir/test_debugger.vim @@ -22,7 +22,7 @@ endfunc " Debugger tests func Test_Debugger() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif " Create a Vim script with some functions diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 1ba36ca8e9..57b19aa817 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -723,7 +723,7 @@ endfunc func Test_diff_with_cursorline() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif call writefile([ @@ -750,7 +750,7 @@ endfunc func Test_diff_of_diff() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot run Vim in a terminal window' endif if !has("rightleft") throw 'Skipped: rightleft not supported' diff --git a/src/nvim/testdir/test_digraph.vim b/src/nvim/testdir/test_digraph.vim index 271066df41..62a5da33df 100644 --- a/src/nvim/testdir/test_digraph.vim +++ b/src/nvim/testdir/test_digraph.vim @@ -1,6 +1,6 @@ " Tests for digraphs -if !has("digraphs") || !has("multi_byte") +if !has("digraphs") finish endif diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim index 0ed672d577..5feb59eef1 100644 --- a/src/nvim/testdir/test_display.vim +++ b/src/nvim/testdir/test_display.vim @@ -41,7 +41,7 @@ func! Test_display_foldcolumn() endfunc func! Test_display_foldtext_mbyte() - if !has("folding") || !has("multi_byte") + if !has("folding") return endif call NewWindow(10, 40) diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 48376d7922..827c54e704 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -37,12 +37,10 @@ func! Test_edit_01() call assert_equal([''], getline(1,'$')) %d " 4) delete a multibyte character - if has("multi_byte") - call setline(1, "\u0401") - call feedkeys("i\<del>\<esc>", 'tnix') - call assert_equal([''], getline(1,'$')) - %d - endif + call setline(1, "\u0401") + call feedkeys("i\<del>\<esc>", 'tnix') + call assert_equal([''], getline(1,'$')) + %d " 5.1) delete linebreak with 'bs' option containing eol let _bs=&bs set bs=eol @@ -452,7 +450,7 @@ endfunc func! Test_edit_CTRL_() " disabled for Windows builds, why? - if !has("multi_byte") || !has("rightleft") || has("win32") + if !has("rightleft") || has("win32") return endif let _encoding=&encoding @@ -620,7 +618,7 @@ func! Test_edit_CTRL_K() endtry call delete('Xdictionary.txt') - if has("multi_byte") && !has("nvim") + if exists('*test_override') call test_override("char_avail", 1) set showcmd %d diff --git a/src/nvim/testdir/test_erasebackword.vim b/src/nvim/testdir/test_erasebackword.vim index 098d6edfcb..9522ec2cd6 100644 --- a/src/nvim/testdir/test_erasebackword.vim +++ b/src/nvim/testdir/test_erasebackword.vim @@ -1,10 +1,5 @@ func Test_erasebackword() - if !has('multi_byte') - return - endif - - set encoding=utf-8 enew exe "normal o wwwこんにちわ世界ワールドvim \<C-W>" @@ -21,5 +16,4 @@ func Test_erasebackword() call assert_equal('', getline('.')) enew! - set encoding& endfunc diff --git a/src/nvim/testdir/test_expr_utf8.vim b/src/nvim/testdir/test_expr_utf8.vim index 1737a9f745..fad725d2e5 100644 --- a/src/nvim/testdir/test_expr_utf8.vim +++ b/src/nvim/testdir/test_expr_utf8.vim @@ -1,7 +1,4 @@ " Tests for expressions using utf-8. -if !has('multi_byte') - finish -endif func Test_strgetchar() call assert_equal(char2nr('á'), strgetchar('áxb', 0)) diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 4036eae678..3cb42579be 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -706,7 +706,7 @@ endfunc func Test_folds_with_rnu() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 9e07e6e1ec..fe3b8bef6e 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -106,11 +106,9 @@ func Test_strwidth() call assert_equal(4, strwidth(1234)) call assert_equal(5, strwidth(-1234)) - if has('multi_byte') - call assert_equal(2, strwidth('😉')) - call assert_equal(17, strwidth('Eĥoŝanĝo ĉiuĵaŭde')) - call assert_equal((aw == 'single') ? 6 : 7, strwidth('Straße')) - endif + call assert_equal(2, strwidth('😉')) + call assert_equal(17, strwidth('Eĥoŝanĝo ĉiuĵaŭde')) + call assert_equal((aw == 'single') ? 6 : 7, strwidth('Straße')) call assert_fails('call strwidth({->0})', 'E729:') call assert_fails('call strwidth([])', 'E730:') @@ -308,10 +306,8 @@ func Test_strpart() call assert_equal('fg', strpart('abcdefg', 5, 4)) call assert_equal('defg', strpart('abcdefg', 3)) - if has('multi_byte') - call assert_equal('lép', strpart('éléphant', 2, 4)) - call assert_equal('léphant', strpart('éléphant', 2)) - endif + call assert_equal('lép', strpart('éléphant', 2, 4)) + call assert_equal('léphant', strpart('éléphant', 2)) endfunc func Test_tolower() @@ -321,10 +317,6 @@ func Test_tolower() call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_`abcdefghijklmnopqrstuvwxyz{|}~', \ tolower(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~')) - if !has('multi_byte') - return - endif - " Test with a few uppercase diacritics. call assert_equal("aàáâãäåāăąǎǟǡả", tolower("AÀÁÂÃÄÅĀĂĄǍǞǠẢ")) call assert_equal("bḃḇ", tolower("BḂḆ")) @@ -399,10 +391,6 @@ func Test_toupper() call assert_equal(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~', \ toupper(' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~')) - if !has('multi_byte') - return - endif - " Test with a few lowercase diacritics. call assert_equal("AÀÁÂÃÄÅĀĂĄǍǞǠẢ", toupper("aàáâãäåāăąǎǟǡả")) call assert_equal("BḂḆ", toupper("bḃḇ")) diff --git a/src/nvim/testdir/test_ga.vim b/src/nvim/testdir/test_ga.vim index 6a7cba28f0..ea3d211aeb 100644 --- a/src/nvim/testdir/test_ga.vim +++ b/src/nvim/testdir/test_ga.vim @@ -21,10 +21,6 @@ func Test_ga_command() call assert_equal("\n<e> 101, Hex 65, Octal 145", Do_ga('e')) - if !has('multi_byte') - return - endif - " Test a few multi-bytes characters. call assert_equal("\n<é> 233, Hex 00e9, Oct 351, Digr e'", Do_ga('é')) call assert_equal("\n<ẻ> 7867, Hex 1ebb, Oct 17273, Digr e2", Do_ga('ẻ')) diff --git a/src/nvim/testdir/test_highlight.vim b/src/nvim/testdir/test_highlight.vim index e751fb5d16..78ec26fd05 100644 --- a/src/nvim/testdir/test_highlight.vim +++ b/src/nvim/testdir/test_highlight.vim @@ -532,7 +532,7 @@ endfunc func Test_cursorline_after_yank() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ @@ -554,7 +554,7 @@ endfunc func Test_cursorline_with_visualmode() if !CanRunVimInTerminal() - return + throw 'Skipped: cannot make screendumps' endif call writefile([ diff --git a/src/nvim/testdir/test_makeencoding.vim b/src/nvim/testdir/test_makeencoding.vim index 6e4c7af821..2b346e0720 100644 --- a/src/nvim/testdir/test_makeencoding.vim +++ b/src/nvim/testdir/test_makeencoding.vim @@ -1,7 +1,4 @@ " Tests for 'makeencoding'. -if !has('multi_byte') - finish -endif source shared.vim diff --git a/src/nvim/testdir/test_maparg.vim b/src/nvim/testdir/test_maparg.vim index ee16a22398..6324e39eec 100644 --- a/src/nvim/testdir/test_maparg.vim +++ b/src/nvim/testdir/test_maparg.vim @@ -1,8 +1,5 @@ " Tests for maparg(). " Also test utf8 map with a 0x80 byte. -if !has("multi_byte") - finish -endif function s:SID() return str2nr(matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$')) diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim index 7fdb3324ce..34e62e80e8 100644 --- a/src/nvim/testdir/test_mapping.vim +++ b/src/nvim/testdir/test_mapping.vim @@ -1,9 +1,5 @@ " Tests for mappings and abbreviations -if !has('multi_byte') - finish -endif - source shared.vim func Test_abbreviation() diff --git a/src/nvim/testdir/test_marks.vim b/src/nvim/testdir/test_marks.vim index 7fd115fd68..272553c29f 100644 --- a/src/nvim/testdir/test_marks.vim +++ b/src/nvim/testdir/test_marks.vim @@ -122,9 +122,6 @@ func Test_marks_cmd() endfunc func Test_marks_cmd_multibyte() - if !has('multi_byte') - return - endif new Xone call setline(1, [repeat('á', &columns)]) norm! ma diff --git a/src/nvim/testdir/test_match.vim b/src/nvim/testdir/test_match.vim index e926b946a9..90dfcf952d 100644 --- a/src/nvim/testdir/test_match.vim +++ b/src/nvim/testdir/test_match.vim @@ -114,36 +114,33 @@ function Test_match() call assert_equal([{'group': 'MyGroup1', 'id': 3, 'priority': 10, 'pos1': [1, 5, 1], 'pos2': [1, 8, 3]}], getmatches()) call clearmatches() - " - if has('multi_byte') - call setline(1, 'abcdΣabcdef') - call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]]) - 1 - redraw! - let v1 = screenattr(1, 1) - let v4 = screenattr(1, 4) - let v5 = screenattr(1, 5) - let v6 = screenattr(1, 6) - let v7 = screenattr(1, 7) - let v8 = screenattr(1, 8) - let v9 = screenattr(1, 9) - let v10 = screenattr(1, 10) - call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1, 9, 2]}], getmatches()) - call assert_notequal(v1, v4) - call assert_equal(v5, v4) - call assert_equal(v6, v1) - call assert_equal(v7, v1) - call assert_equal(v8, v4) - call assert_equal(v9, v4) - call assert_equal(v10, v1) - - " Check, that setmatches() can correctly restore the matches from matchaddpos() - call matchadd('MyGroup1', '\%2lmatchadd') - let m=getmatches() - call clearmatches() - call setmatches(m) - call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1,9, 2]}, {'group': 'MyGroup1', 'pattern': '\%2lmatchadd', 'priority': 10, 'id': 12}], getmatches()) - endif + call setline(1, 'abcdΣabcdef') + call matchaddpos("MyGroup1", [[1, 4, 2], [1, 9, 2]]) + 1 + redraw! + let v1 = screenattr(1, 1) + let v4 = screenattr(1, 4) + let v5 = screenattr(1, 5) + let v6 = screenattr(1, 6) + let v7 = screenattr(1, 7) + let v8 = screenattr(1, 8) + let v9 = screenattr(1, 9) + let v10 = screenattr(1, 10) + call assert_equal([{'group': 'MyGroup1', 'id': 11, 'priority': 10, 'pos1': [1, 4, 2], 'pos2': [1, 9, 2]}], getmatches()) + call assert_notequal(v1, v4) + call assert_equal(v5, v4) + call assert_equal(v6, v1) + call assert_equal(v7, v1) + call assert_equal(v8, v4) + call assert_equal(v9, v4) + call assert_equal(v10, v1) + + " Check, that setmatches() can correctly restore the matches from matchaddpos() + call matchadd('MyGroup1', '\%2lmatchadd') + let m=getmatches() + call clearmatches() + call setmatches(m) + call assert_equal([{'group': 'MyGroup1', 'id |