From 55ff49b1a79d557848cb9c156a913538a876ddc6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 20 Jul 2020 20:22:00 -0400 Subject: vim-patch:8.2.1254: MS-Windows: regexp test may fail if 'iskeyword' set wrongly Problem: MS-Windows: regexp test may fail if 'iskeyword' set wrongly. Solution: Override the 'iskeyword' value. (Taro Muraoka, closes vim/vim#6502) https://github.com/vim/vim/commit/470adb827f3d9e6cf62f685738d2db216daf3738 --- src/nvim/testdir/test_regexp_utf8.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_regexp_utf8.vim b/src/nvim/testdir/test_regexp_utf8.vim index f48458566b..cfd3d2a48e 100644 --- a/src/nvim/testdir/test_regexp_utf8.vim +++ b/src/nvim/testdir/test_regexp_utf8.vim @@ -32,6 +32,9 @@ func Test_equivalence_re2() endfunc func s:classes_test() + if has('win32') + set iskeyword=@,48-57,_,192-255 + endif set isprint=@,161-255 call assert_equal('Motörhead', matchstr('Motörhead', '[[:print:]]\+')) -- cgit From c207886bdf9c4545d48837c968091b1384569562 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 16 Jul 2020 23:48:58 -0400 Subject: vim-patch:8.1.2172: spell highlight is wrong at start of the line Problem: Spell highlight is wrong at start of the line. Solution: Fix setting the "v" variable. (closes vim/vim#5078) https://github.com/vim/vim/commit/7751d1d1a3d447d0d48f57f34e0da9f7c6ac433d Skip spell tests in OpenBSD. Nvim or screen likely crashed. Revist once issue #12104 is fixed. Skip the test for the following reasons: - unknown regression caused by https://github.com/neovim/neovim/issues/12104 - cannot revert failing test from https://github.com/neovim/neovim/commit/ed0d135247790f67ead7f1a8c21a020790e80a74 --- src/nvim/testdir/check.vim | 11 +++++++++++ src/nvim/testdir/test_spell.vim | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/nvim/testdir/check.vim (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim new file mode 100644 index 0000000000..57a8eb57b8 --- /dev/null +++ b/src/nvim/testdir/check.vim @@ -0,0 +1,11 @@ +source shared.vim +source term_util.vim + +" Command to check that making screendumps is supported. +" Caller must source screendump.vim +command CheckScreendump call CheckScreendump() +func CheckScreendump() + if !CanRunVimInTerminal() + throw 'Skipped: cannot make screendumps' + endif +endfunc diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index e5eaa01e92..414c7278eb 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -1,10 +1,13 @@ " Test spell checking " Note: this file uses latin1 encoding, but is used with utf-8 encoding. +source check.vim if !has('spell') finish endif +source screendump.vim + func TearDown() set nospell call delete('Xtest.aff') @@ -477,6 +480,44 @@ func RunGoodBad(good, bad, expected_words, expected_bad_words) bwipe! endfunc +func Test_spell_screendump() + CheckScreendump + + let lines =<< trim END + call setline(1, [ + \ "This is some text without any spell errors. Everything", + \ "should just be black, nothing wrong here.", + \ "", + \ "This line has a sepll error. and missing caps.", + \ "And and this is the the duplication.", + \ "with missing caps here.", + \ ]) + set spell spelllang=en_nz + END + call writefile(lines, 'XtestSpell') + let buf = RunVimInTerminal('-S XtestSpell', {'rows': 8}) + call VerifyScreenDump(buf, 'Test_spell_1', {}) + + let lines =<< trim END + call setline(1, [ + \ "This is some text without any spell errors. Everything", + \ "should just be black, nothing wrong here.", + \ "", + \ "This line has a sepll error. and missing caps.", + \ "And and this is the the duplication.", + \ "with missing caps here.", + \ ]) + set spell spelllang=en_nz + END + call writefile(lines, 'XtestSpell') + let buf = RunVimInTerminal('-S XtestSpell', {'rows': 8}) + call VerifyScreenDump(buf, 'Test_spell_1', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('XtestSpell') +endfunc + let g:test_data_aff1 = [ \"SET ISO8859-1", \"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ", -- cgit From ed41ac08cff396a52bf2bd2eef83205c55b079ba Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 17 Jul 2020 21:20:56 -0400 Subject: vim-patch:8.2.1004: line numbers below filler lines not always updated Problem: Line numbers below filler lines not always updated. Solution: Don't break out of the win_line() loop too early. (Christian Brabandt, closes vim/vim#6294, closes vim/vim#6138) https://github.com/vim/vim/commit/511feec6f0a9e954f1d7353425fa51232b1a8e88 --- src/nvim/testdir/test_diffmode.vim | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 49bbe84869..a1f1dd3bab 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -1,6 +1,7 @@ " Tests for diff mode source shared.vim source screendump.vim +source check.vim func Test_diff_fold_sync() enew! @@ -801,6 +802,34 @@ func Test_diff_closeoff() enew! endfunc +func Test_diff_rnu() + CheckScreendump + + let content =<< trim END + call setline(1, ['a', 'a', 'a', 'y', 'b', 'b', 'b', 'b', 'b']) + vnew + call setline(1, ['a', 'a', 'a', 'x', 'x', 'x', 'b', 'b', 'b', 'b', 'b']) + call setline(1, ['a', 'a', 'a', 'y', 'b', 'b', 'b', 'b', 'b']) + vnew + call setline(1, ['a', 'a', 'a', 'x', 'x', 'x', 'b', 'b', 'b', 'b', 'b']) + windo diffthis + setlocal number rnu foldcolumn=0 + END + call writefile(content, 'Xtest_diff_rnu') + let buf = RunVimInTerminal('-S Xtest_diff_rnu', {}) + + call VerifyScreenDump(buf, 'Test_diff_rnu_01', {}) + + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_diff_rnu_02', {}) + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_diff_rnu_03', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_diff_rnu') +endfunc + func Test_diff_and_scroll() " this was causing an ml_get error set ls=2 -- cgit From 9443d3994190943c2b9d8c4efefcf3de854ec7be Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 21 Jul 2020 18:51:47 -0400 Subject: vim-patch:8.2.1259: empty group in 'tabline' may cause using an invalid pointer Problem: Empty group in 'tabline' may cause using an invalid pointer. Solution: Set the group start position. (closes vim/vim#6505) https://github.com/vim/vim/commit/f56c95fdad5af521887f8cd7bc15729b5355231d --- src/nvim/testdir/test_tabline.vim | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_tabline.vim b/src/nvim/testdir/test_tabline.vim index f24552088b..117d962d08 100644 --- a/src/nvim/testdir/test_tabline.vim +++ b/src/nvim/testdir/test_tabline.vim @@ -64,3 +64,28 @@ func Test_redrawtabline() let &showtabline = showtabline_save au! Bufadd endfunc + +function EmptyTabname() + return "" +endfunction + +function MakeTabLine() abort + let titles = map(range(1, tabpagenr('$')), '"%( %" . v:val . "T%{EmptyTabname()}%T %)"') + let sep = 'あ' + let tabpages = join(titles, sep) + return tabpages .. sep .. '%=%999X X' +endfunction + +func Test_tabline_empty_group() + " this was reading invalid memory + set tabline=%!MakeTabLine() + tabnew + redraw! + + tabclose + set tabline= +endfunc + + + +" vim: shiftwidth=2 sts=2 expandtab -- cgit From f3964c170e9719af26d00b82e10be37a80693d15 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 22 Jul 2020 23:29:02 -0400 Subject: vim-patch:8.2.1267: MS-Windows: tests may fail due to $PROMPT value Problem: MS-Windows: tests may fail due to $PROMPT value. Solution: Set $PROMPT for testing. (Taro Muraoka, closes vim/vim#6510) https://github.com/vim/vim/commit/2690b5aed8b6b6070430b05dcae296cd9479c942 --- src/nvim/testdir/runtest.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index e249d499c4..2bf61b0719 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -84,6 +84,11 @@ let &runtimepath .= ','.expand($BUILD_DIR).'/runtime/' " Always use forward slashes. set shellslash +if has('win32') + " avoid prompt that is long or contains a line break + let $PROMPT = '$P$G' +endif + " Prepare for calling test_garbagecollect_now(). let v:testing = 1 -- cgit From 6f3a18197b5d31f24afff244baf7f00fab659804 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 25 Jul 2020 08:17:01 -0400 Subject: vim-patch:8.1.2340: quickfix test fails under valgrind and asan Problem: Quickfix test fails under valgrind and asan. Solution: Make sure long line does not overflow IObuff. (Dominique Pelle, closes vim/vim#5263) Put back fix for large terminals. (Yegappan Lakshmanan, closes vim/vim#5264) https://github.com/vim/vim/commit/a106e6cde682bda4ad10ed745acb51975fcb02e0 --- src/nvim/testdir/test_quickfix.vim | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 35555ca9d3..926103b69f 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -554,6 +554,33 @@ func s:test_xhelpgrep(cchar) " This wipes out the buffer, make sure that doesn't cause trouble. Xclose + " When the current window is vertically split, jumping to a help match + " should open the help window at the top. + only | enew + let w1 = win_getid() + vert new + let w2 = win_getid() + Xnext + let w3 = win_getid() + call assert_true(&buftype == 'help') + call assert_true(winnr() == 1) + " See jump_to_help_window() for details + let w2_width = winwidth(w2) + if w2_width != &columns && w2_width < 80 + call assert_equal(['col', [['leaf', w3], + \ ['row', [['leaf', w2], ['leaf', w1]]]]], winlayout()) + else + call assert_equal(['row', [['col', [['leaf', w3], ['leaf', w2]]], + \ ['leaf', w1]]] , winlayout()) + endif + + new | only + set buftype=help + set modified + call assert_fails('Xnext', 'E37:') + set nomodified + new | only + if a:cchar == 'l' " When a help window is present, running :lhelpgrep should reuse the " help window and not the current window -- cgit From 45b91711e4fec50bf1f63d2fc2afa09b729643a0 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 25 Jul 2020 11:34:03 -0400 Subject: vim-patch:8.2.1292: AIDL filetype not recognized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: AIDL filetype not recognized. Solution: Add filetype detection. (Dominique Pellé, closes vim/vim#6533) https://github.com/vim/vim/commit/2afc3b4f776a4fe2bb22d0a79e77012d79b4ec1e --- src/nvim/testdir/test_filetype.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index d440bdcb1e..2e280417ae 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -54,6 +54,7 @@ let s:filename_checks = { \ 'acedb': ['file.wrm'], \ 'ada': ['file.adb', 'file.ads', 'file.ada', 'file.gpr'], \ 'ahdl': ['file.tdf'], + \ 'aidl': ['file.aidl'], \ 'alsaconf': ['.asoundrc', '/usr/share/alsa/alsa.conf', '/etc/asound.conf'], \ 'aml': ['file.aml'], \ 'ampl': ['file.run'], -- cgit From 513d117947f244ec20909ab62d6d5371e704bc61 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 26 Jul 2020 13:43:02 -0400 Subject: vim-patch:8.2.1295: tests 44 and 99 are old style Problem: Tests 44 and 99 are old style. Solution: Convert to new style tests. (Yegappan Lakshmanan, closes vim/vim#6536) https://github.com/vim/vim/commit/7d40b8a532fa2ce768f200ab118870d17875a7fe --- src/nvim/testdir/test_regexp_utf8.vim | 124 ++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_regexp_utf8.vim b/src/nvim/testdir/test_regexp_utf8.vim index cfd3d2a48e..209de2c35e 100644 --- a/src/nvim/testdir/test_regexp_utf8.vim +++ b/src/nvim/testdir/test_regexp_utf8.vim @@ -354,4 +354,128 @@ func Test_regexp_ignore_case() set regexpengine& endfunc +" Tests for regexp with multi-byte encoding and various magic settings +func Run_regexp_multibyte_magic() + let text =<< trim END + 1 a aa abb abbccc + 2 d dd dee deefff + 3 g gg ghh ghhiii + 4 j jj jkk jkklll + 5 m mm mnn mnnooo + 6 x ^aa$ x + 7 (a)(b) abbaa + 8 axx [ab]xx + 9 หม่x อมx + a อมx หม่x + b ちカヨは + c x ¬€x + d 天使x + e y + f z + g a啷bb + j 0123❤x + k combinations + l äö üᾱ̆́ + END + + new + call setline(1, text) + exe 'normal /a*b\{2}c\+/e' .. "\x" + call assert_equal('1 a aa abb abbcc', getline('.')) + exe 'normal /\Md\*e\{2}f\+/e' .. "\x" + call assert_equal('2 d dd dee deeff', getline('.')) + set nomagic + exe 'normal /g\*h\{2}i\+/e' .. "\x" + call assert_equal('3 g gg ghh ghhii', getline('.')) + exe 'normal /\mj*k\{2}l\+/e' .. "\x" + call assert_equal('4 j jj jkk jkkll', getline('.')) + exe 'normal /\vm*n{2}o+/e' .. "\x" + call assert_equal('5 m mm mnn mnnoo', getline('.')) + exe 'normal /\V^aa$/' .. "\x" + call assert_equal('6 x aa$ x', getline('.')) + set magic + exe 'normal /\v(a)(b)\2\1\1/e' .. "\x" + call assert_equal('7 (a)(b) abba', getline('.')) + exe 'normal /\V[ab]\(\[xy]\)\1' .. "\x" + call assert_equal('8 axx ab]xx', getline('.')) + + " search for multi-byte without composing char + exe 'normal /ม' .. "\x" + call assert_equal('9 หม่x อx', getline('.')) + + " search for multi-byte with composing char + exe 'normal /ม่' .. "\x" + call assert_equal('a อมx หx', getline('.')) + + " find word by change of word class + exe 'normal /ち\<カヨ\>は' .. "\x" + call assert_equal('b カヨは', getline('.')) + + " Test \%u, [\u] and friends + " c + exe 'normal /\%u20ac' .. "\x" + call assert_equal('c x ¬x', getline('.')) + " d + exe 'normal /[\u4f7f\u5929]\+' .. "\x" + call assert_equal('d 使x', getline('.')) + " e + exe 'normal /\%U12345678' .. "\x" + call assert_equal('e y', getline('.')) + " f + exe 'normal /[\U1234abcd\u1234\uabcd]' .. "\x" + call assert_equal('f z', getline('.')) + " g + exe 'normal /\%d21879b' .. "\x" + call assert_equal('g abb', getline('.')) + + " j Test backwards search from a multi-byte char + exe "normal /x\x?.\x" + call assert_equal('j 012❤', getline('.')) + " k + let @w=':%s#comb[i]nations#œ̄ṣ́m̥̄ᾱ̆́#g' + @w + call assert_equal('k œ̄ṣ́m̥̄ᾱ̆́', getline(18)) + + close! +endfunc + +func Test_regexp_multibyte_magic() + set regexpengine=1 + call Run_regexp_multibyte_magic() + set regexpengine=2 + call Run_regexp_multibyte_magic() + set regexpengine& +endfunc + +" Test for 7.3.192 +" command ":s/ \?/ /g" splits multi-byte characters into bytes +func Test_split_multibyte_to_bytes() + new + call setline(1, 'l äö üᾱ̆́') + s/ \?/ /g + call assert_equal(' l ä ö ü ᾱ̆́', getline(1)) + close! +endfunc + +" Test for matchstr() with multibyte characters +func Test_matchstr_multibyte() + new + call assert_equal('ב', matchstr("אבגד", ".", 0, 2)) + call assert_equal('בג', matchstr("אבגד", "..", 0, 2)) + call assert_equal('א', matchstr("אבגד", ".", 0, 0)) + call assert_equal('ג', matchstr("אבגד", ".", 4, -1)) + close! +endfunc + +" Test for 7.4.636 +" A search with end offset gets stuck at end of file. +func Test_search_with_end_offset() + new + call setline(1, ['', 'dog(a', 'cat(']) + exe "normal /(/e+" .. "\" + normal "ayn + call assert_equal("a\ncat(", @a) + close! +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit From 1123a979d06d66f0bf4ab8684829a64832986a25 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 24 Jul 2020 19:53:07 -0400 Subject: vim-patch:8.1.0862: no verbose version of character classes Problem: No verbose version of character classes. Solution: Add [:ident:], [:keyword:] and [:fname:]. (Ozaki Kiichi, closes vim/vim#1373) https://github.com/vim/vim/commit/221cd9f4dd866503777b2fffa721c1403716ad63 --- src/nvim/testdir/test_regexp_utf8.vim | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_regexp_utf8.vim b/src/nvim/testdir/test_regexp_utf8.vim index 209de2c35e..4466ad436a 100644 --- a/src/nvim/testdir/test_regexp_utf8.vim +++ b/src/nvim/testdir/test_regexp_utf8.vim @@ -54,6 +54,12 @@ func s:classes_test() let tabchar = '' let upperchars = '' let xdigitchars = '' + let identchars = '' + let identchars1 = '' + let kwordchars = '' + let kwordchars1 = '' + let fnamechars = '' + let fnamechars1 = '' let i = 1 while i <= 255 let c = nr2char(i) @@ -105,6 +111,24 @@ func s:classes_test() if c =~ '[[:xdigit:]]' let xdigitchars .= c endif + if c =~ '[[:ident:]]' + let identchars .= c + endif + if c =~ '\i' + let identchars1 .= c + endif + if c =~ '[[:keyword:]]' + let kwordchars .= c + endif + if c =~ '\k' + let kwordchars1 .= c + endif + if c =~ '[[:fname:]]' + let fnamechars .= c + endif + if c =~ '\f' + let fnamechars1 .= c + endif let i += 1 endwhile @@ -124,6 +148,37 @@ func s:classes_test() call assert_equal("\t\n\x0b\f\r ", spacechars) call assert_equal("\t", tabchar) call assert_equal('0123456789ABCDEFabcdef', xdigitchars) + + if has('win32') + let identchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ' + let kwordchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + elseif has('ebcdic') + let identchars_ok = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz€ŒŽœž¬®µº¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + let kwordchars_ok = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz€ŒŽœž¬®µº¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + else + let identchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + let kwordchars_ok = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzµÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + endif + + if has('win32') + let fnamechars_ok = '!#$%+,-./0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]_abcdefghijklmnopqrstuvwxyz{}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + elseif has('amiga') + let fnamechars_ok = '$+,-./0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + elseif has('vms') + let fnamechars_ok = '#$%+,-./0123456789:;<>ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + elseif has('ebcdic') + let fnamechars_ok = '#$%+,-./=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + else + let fnamechars_ok = '#$%+,-./0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ' + endif + + call assert_equal(identchars_ok, identchars) + call assert_equal(kwordchars_ok, kwordchars) + call assert_equal(fnamechars_ok, fnamechars) + + call assert_equal(identchars1, identchars) + call assert_equal(kwordchars1, kwordchars) + call assert_equal(fnamechars1, fnamechars) endfunc func Test_classes_re1() -- cgit From ae92177063d64e9132943852fa932a9e63c3ba23 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 Aug 2020 13:36:43 -0400 Subject: vim-patch:8.1.0255: backup test fails when using shadow directory Problem: Backup test fails when using shadow directory. Solution: Remove check for "src". https://github.com/vim/vim/commit/f8f88f89e12df516c1fac5851b504238ebc1d2d4 --- src/nvim/testdir/test_backup.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_backup.vim b/src/nvim/testdir/test_backup.vim index fa10430613..0981efdcee 100644 --- a/src/nvim/testdir/test_backup.vim +++ b/src/nvim/testdir/test_backup.vim @@ -29,7 +29,7 @@ func Test_backup2() sp *Xbackup.txt~ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$')) let f=expand('%') - call assert_match('src%nvim%testdir%Xbackup.txt\~', f) + call assert_match('%testdir%Xbackup.txt\~', f) bw! bw! call delete('Xbackup.txt') @@ -49,7 +49,7 @@ func Test_backup2_backupcopy() sp *Xbackup.txt~ call assert_equal(['line1', 'line2', 'line3'], getline(1,'$')) let f=expand('%') - call assert_match('src%nvim%testdir%Xbackup.txt\~', f) + call assert_match('%testdir%Xbackup.txt\~', f) bw! bw! call delete('Xbackup.txt') -- cgit From ea515f8ca1fa63cfad516a956cd78ef371f91955 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 Aug 2020 11:56:22 -0400 Subject: vim-patch:8.1.0264: backup tests fail when CWD is in /tmp Problem: Backup tests fail when CWD is in /tmp. Solution: Make 'backupskip' empty. (Christian Brabandt, closes vim/vim#3301) https://github.com/vim/vim/commit/efe03738f69b1f63ea30226765db949539ee15f0 --- src/nvim/testdir/test_backup.vim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_backup.vim b/src/nvim/testdir/test_backup.vim index 0981efdcee..ce2bfe72bc 100644 --- a/src/nvim/testdir/test_backup.vim +++ b/src/nvim/testdir/test_backup.vim @@ -1,7 +1,7 @@ " Tests for the backup function func Test_backup() - set backup backupdir=. + set backup backupdir=. backupskip= new call setline(1, ['line1', 'line2']) :f Xbackup.txt @@ -12,13 +12,13 @@ func Test_backup() let l = readfile('Xbackup.txt~') call assert_equal(['line1', 'line2'], l) bw! - set backup&vim backupdir&vim + set backup&vim backupdir&vim backupskip&vim call delete('Xbackup.txt') call delete('Xbackup.txt~') endfunc func Test_backup2() - set backup backupdir=.// + set backup backupdir=.// backupskip= new call setline(1, ['line1', 'line2', 'line3']) :f Xbackup.txt @@ -34,11 +34,11 @@ func Test_backup2() bw! call delete('Xbackup.txt') call delete(f) - set backup&vim backupdir&vim + set backup&vim backupdir&vim backupskip&vim endfunc func Test_backup2_backupcopy() - set backup backupdir=.// backupcopy=yes + set backup backupdir=.// backupcopy=yes backupskip= new call setline(1, ['line1', 'line2', 'line3']) :f Xbackup.txt @@ -54,5 +54,5 @@ func Test_backup2_backupcopy() bw! call delete('Xbackup.txt') call delete(f) - set backup&vim backupdir&vim backupcopy&vim + set backup&vim backupdir&vim backupcopy&vim backupskip&vim endfunc -- cgit