From 0301de758ba90139a4af9edc3993ef438a4d4cd1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 31 Dec 2019 23:15:42 -0500 Subject: vim-patch:8.1.1346: error for Python exception does not show useful info Problem: Error for Python exception does not show useful info. Solution: Show the last line instead of the first one. (Ben Jackson, closes vim/vim#4381) https://github.com/vim/vim/commit/7f3a28490abb7c495239fc438825e3d1aaafa76d --- src/nvim/testdir/test_python3.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index cd07b0883f..e64a8fcc47 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -164,3 +164,11 @@ func Test_Write_To_Current_Buffer_Fixes_Cursor_Str() bwipe! endfunction + +func Test_Catch_Exception_Message() + try + py3 raise RuntimeError( 'TEST' ) + catch /.*/ + call assert_match('^Vim(.*):.*RuntimeError: TEST$', v:exception ) + endtry +endfunc -- cgit From 0f47870d1b5e893857df007901f5f062939a9eb7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 31 Dec 2019 23:22:58 -0500 Subject: vim-patch:8.2.0068: crash when using Python 3 with "utf32" encoding Problem: Crash when using Python 3 with "utf32" encoding. (Dominique Pelle) Solution: Use "utf-8" whenever enc_utf8 is set. (closes vim/vim#5423) https://github.com/vim/vim/commit/556684ff71e044a642879d759373a7ebc5047fad --- src/nvim/testdir/test_python3.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index e64a8fcc47..5268dc9d1e 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -172,3 +172,10 @@ func Test_Catch_Exception_Message() call assert_match('^Vim(.*):.*RuntimeError: TEST$', v:exception ) endtry endfunc + +func Test_unicode() + " this crashed Vim once + " set encoding=utf32 + py3 print('hello') + " set encoding=utf8 +endfunc -- cgit From 5f0d5ec9852cf82c9b865ac2d3cf7f6e131adf4a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 1 Jan 2020 10:16:25 -0500 Subject: vim-patch:8.2.0070: crash when using Python 3 with "debug" encoding Problem: Crash when using Python 3 with "debug" encoding. (Dominique Pelle) Solution: Use "euc-jp" whenever enc_dbcs is set. https://github.com/vim/vim/commit/d518f952f0812778758b25139308bcf45df6988c --- src/nvim/testdir/test_python3.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index 5268dc9d1e..edd24c7be5 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -174,8 +174,13 @@ func Test_Catch_Exception_Message() endfunc func Test_unicode() + throw 'skipped: Nvim only supports "utf-8" for "encoding" option' " this crashed Vim once - " set encoding=utf32 + set encoding=utf32 py3 print('hello') - " set encoding=utf8 + set encoding=debug + py3 print('hello') + set encoding=euc-tw + py3 print('hello') + set encoding=utf8 endfunc -- cgit From abaabd1d03fd723630f6addeadee9928faa4cdde Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 1 Jan 2020 13:03:06 -0500 Subject: vim-patch:8.2.0074: Python 3 unicode test someitmes fails Problem: Python 3 unicode test someitmes fails. Solution: Make 'termencoding' empty. Correct number of error message. https://github.com/vim/vim/commit/4b7cdca23035eacf6cd0e30b90546cf32f7efe9e --- src/nvim/testdir/test_python3.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index edd24c7be5..9ffca12706 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -174,13 +174,20 @@ func Test_Catch_Exception_Message() endfunc func Test_unicode() - throw 'skipped: Nvim only supports "utf-8" for "encoding" option' + throw 'skipped: Nvim does not support "termencoding" option and only supports "utf-8" for "encoding" option' " this crashed Vim once + let save_tenc = &tenc + set tenc= + set encoding=utf32 py3 print('hello') + set encoding=debug py3 print('hello') + set encoding=euc-tw py3 print('hello') + set encoding=utf8 + let &tenc = save_tenc endfunc -- cgit From a11c3b7920cbfef7e609f34d54093da2195c2a08 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 1 Jan 2020 13:12:43 -0500 Subject: vim-patch:8.2.0075: Python 3 unicode test still sometimes fails Problem: Python 3 unicode test still sometimes fails. Solution: Skip the test when 'termencoding' is not empty. https://github.com/vim/vim/commit/2466aea508f22d44099d54ed6d15c0a1d90f8d6e --- src/nvim/testdir/test_python3.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index 9ffca12706..259ba1350a 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -176,8 +176,9 @@ endfunc func Test_unicode() throw 'skipped: Nvim does not support "termencoding" option and only supports "utf-8" for "encoding" option' " this crashed Vim once - let save_tenc = &tenc - set tenc= + if &tenc != '' + throw "Skipped: 'termencoding' is not empty" + endif set encoding=utf32 py3 print('hello') @@ -189,5 +190,4 @@ func Test_unicode() py3 print('hello') set encoding=utf8 - let &tenc = save_tenc endfunc -- cgit From 7dca8383db4d595a8e9de929aff1263c0b0b8db5 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 1 Jan 2020 13:13:40 -0500 Subject: vim-patch:8.2.0076: Python 3 unicode test fails on MS-Windows Problem: Python 3 unicode test fails on MS-Windows. Solution: Do not set 'encoding' to "debug" on MS-Windows. https://github.com/vim/vim/commit/955f4e6f36ea009b90803d12a62108c94f446778 --- src/nvim/testdir/test_python3.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index 259ba1350a..948ef0a07f 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -183,8 +183,10 @@ func Test_unicode() set encoding=utf32 py3 print('hello') - set encoding=debug - py3 print('hello') + if !has('win32') + set encoding=debug + py3 print('hello') + endif set encoding=euc-tw py3 print('hello') -- cgit From 77b61cb0dff55318fdec9e28ccbaedd051996c5a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 3 Jan 2020 00:42:52 -0500 Subject: option: restore termencoding (readonly) #11662 'termencoding' option was removed in abaabd1d03fd723630f6addeadee9928faa4cdde but some plugins check its value. --- src/nvim/testdir/test_python3.vim | 1 - 1 file changed, 1 deletion(-) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index 948ef0a07f..d0f80b8958 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -174,7 +174,6 @@ func Test_Catch_Exception_Message() endfunc func Test_unicode() - throw 'skipped: Nvim does not support "termencoding" option and only supports "utf-8" for "encoding" option' " this crashed Vim once if &tenc != '' throw "Skipped: 'termencoding' is not empty" -- cgit From 94cc8a20b42bfa6ef5a344361cd7311cb6036b56 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 3 Jan 2020 07:13:45 -0500 Subject: vim-patch:8.2.0079: test still fails on MS-Windows #11663 Problem: Python 3 unicode test still fails on MS-Windows. Solution: Do not set 'encoding' to "euc-tw" on MS-Windows. https://github.com/vim/vim/commit/7fc4785ea19306b7e94beb61f226cf40c32b1aba --- src/nvim/testdir/test_python3.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index d0f80b8958..108f78f976 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -185,10 +185,10 @@ func Test_unicode() if !has('win32') set encoding=debug py3 print('hello') - endif - set encoding=euc-tw - py3 print('hello') + set encoding=euc-tw + py3 print('hello') + endif set encoding=utf8 endfunc -- cgit From f5cc5153c6a73af50b034676e116b667892ababe Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 19 Jan 2020 09:14:06 -0500 Subject: vim-patch:8.1.2421: test88 is old style Problem: Test88 is old style. Solution: Turn into a new style test. (Yegappan Lakshmanan, closes vim/vim#5347) https://github.com/vim/vim/commit/213ed008bbcd9fe0d3329b17f5f4af0169e448ff 'test_conceal.vim' requires +conceal and +terminal so it is N/A. --- src/nvim/testdir/test_python3.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index 108f78f976..436d74b85d 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -1,5 +1,5 @@ " Test for python 3 commands. -" TODO: move tests from test88.in here. +" TODO: move tests from test87.in here. if !has('python3') finish -- cgit From b3974e4437a0119ca81c926bd2b6549aca509c13 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 19 Jan 2020 08:48:35 +0100 Subject: restore old 'termencoding' behavior Partially reverts #11647. Replaces #11662 The old implementation was removed without clear motivation. The "term option" hackaround added in its place is neither shorter nor simpler. The new behavior breaks even init.vim that expliticly check against it: if exists('&termencoding') set termencoding=utf-8 endif There was nothing wrong with the 0.4.x behavior. Empty &tenc has indicated that the &enc value should be used for all the history of Nvim. Ignoring setting the option is the expected behavior for Vim versions that does not support the option (and Nvim is such a version) 'tenc' was also irrelevant to the Test_unicode python3 test. The reason this has to be disabled is that neovim can't change internal 'encoding' --- src/nvim/testdir/test_python3.vim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/testdir/test_python3.vim') diff --git a/src/nvim/testdir/test_python3.vim b/src/nvim/testdir/test_python3.vim index 108f78f976..31e0142bf4 100644 --- a/src/nvim/testdir/test_python3.vim +++ b/src/nvim/testdir/test_python3.vim @@ -175,9 +175,7 @@ endfunc func Test_unicode() " this crashed Vim once - if &tenc != '' - throw "Skipped: 'termencoding' is not empty" - endif + throw "Skipped: nvim does not support changing 'encoding'" set encoding=utf32 py3 print('hello') -- cgit