diff --git a/src/nvim/testdir/test_python2.vim b/src/nvim/testdir/test_python2.vim index 8d55b59c31..9628a298b9 100644 --- a/src/nvim/testdir/test_python2.vim +++ b/src/nvim/testdir/test_python2.vim @@ -164,3 +164,11 @@ func Test_Write_To_Current_Buffer_Fixes_Cursor_Str() bwipe! endfunction + +func Test_Catch_Exception_Message() + try + py raise RuntimeError( 'TEST' ) + catch /.*/ + call assert_match('^Vim(.*):.*RuntimeError: TEST$', v:exception ) + endtry +endfunc 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 diff --git a/src/nvim/testdir/test_pyx2.vim b/src/nvim/testdir/test_pyx2.vim index 50e57c3bfb..10ff3b6e58 100644 --- a/src/nvim/testdir/test_pyx2.vim +++ b/src/nvim/testdir/test_pyx2.vim @@ -72,3 +72,11 @@ func Test_pyxfile() call assert_match(s:py3pattern, split(var)[0]) endif endfunc + +func Test_Catch_Exception_Message() + try + pyx raise RuntimeError( 'TEST' ) + catch /.*/ + call assert_match('^Vim(.*):.*RuntimeError: TEST$', v:exception ) + endtry +endfunc diff --git a/src/nvim/testdir/test_pyx3.vim b/src/nvim/testdir/test_pyx3.vim index 64546b4688..2044af3abe 100644 --- a/src/nvim/testdir/test_pyx3.vim +++ b/src/nvim/testdir/test_pyx3.vim @@ -72,3 +72,11 @@ func Test_pyxfile() call assert_match(s:py2pattern, split(var)[0]) endif endfunc + +func Test_Catch_Exception_Message() + try + pyx raise RuntimeError( 'TEST' ) + catch /.*/ + call assert_match('^Vim(.*):.*RuntimeError: TEST$', v:exception ) + endtry +endfunc