From c53e78e1256e39742062e93cb784b0ab2238afa5 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 28 Jul 2019 19:59:23 -0400 Subject: vim-patch:8.1.1005: test fails because t_F2 is not set Problem: Test fails because t_F2 is not set. Solution: Add try-catch. https://github.com/vim/vim/commit/55d81cd2a15d93dba89b2ff1c988d82789919b6b --- src/nvim/testdir/test_registers.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim index 414244768a..e63c03d787 100644 --- a/src/nvim/testdir/test_registers.vim +++ b/src/nvim/testdir/test_registers.vim @@ -68,12 +68,17 @@ endfunc " characters as an escape sequence. func Test_recording_esc_sequence() new - let save_F2 = &t_F2 + try + let save_F2 = &t_F2 + catch + endtry let t_F2 = "\OQ" call feedkeys("qqiTest\", "xt") call feedkeys("OQuirk\q", "xt") call feedkeys("Go\@q", "xt") call assert_equal(['Quirk', 'Test', 'Quirk', 'Test'], getline(1, 4)) bwipe! - let t_F2 = save_F2 + if exists('save_F2') + let t_F2 = save_F2 + endif endfunc -- cgit From 00e882e6f6219312d59582278c62c759f86bfc6d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 28 Jul 2019 19:59:38 -0400 Subject: vim-patch:8.1.1394: not restoring t_F2 in registers test Problem: Not restoring t_F2 in registers test. Solution: Assign to &t_F2 instead of t_F2. (Andy Massimino, closes vim/vim#4434) https://github.com/vim/vim/commit/a5e44600ebb02057fb15ae7a2f15c5cae8f63bcc --- src/nvim/testdir/test_registers.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim index e63c03d787..298268a994 100644 --- a/src/nvim/testdir/test_registers.vim +++ b/src/nvim/testdir/test_registers.vim @@ -79,6 +79,6 @@ func Test_recording_esc_sequence() call assert_equal(['Quirk', 'Test', 'Quirk', 'Test'], getline(1, 4)) bwipe! if exists('save_F2') - let t_F2 = save_F2 + let &t_F2 = save_F2 endif endfunc -- cgit From 4c50f0dc7640ca11bbe1aea51e5b95b4f974347d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 28 Jul 2019 20:22:59 -0400 Subject: vim-patch:8.1.1041: test for Arabic no longer needed Problem: Test for Arabic no longer needed. Solution: Remove the test for something that was intentionally left out. https://github.com/vim/vim/commit/295e3ba31f76818f195c654df506c88cb65f9289 --- src/nvim/testdir/test_arabic.vim | 48 ---------------------------------------- 1 file changed, 48 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_arabic.vim b/src/nvim/testdir/test_arabic.vim index 17e925ee7f..d67f875f97 100644 --- a/src/nvim/testdir/test_arabic.vim +++ b/src/nvim/testdir/test_arabic.vim @@ -524,54 +524,6 @@ func Test_shape_final() bwipe! endfunc -func Test_shape_final_to_medial() - new - set arabicshape - - " Shaping arabic {testchar} arabic Tests chg_c_f2m(). - " This does not test much... - " pair[0] = testchar, pair[1] = current-result - for pair in [[s:a_f_YEH_HAMZA, s:a_f_BEH], - \[s:a_f_WAW_HAMZA, s:a_s_BEH], - \[s:a_f_ALEF, s:a_s_BEH], - \[s:a_f_TEH_MARBUTA, s:a_s_BEH], - \[s:a_f_DAL, s:a_s_BEH], - \[s:a_f_THAL, s:a_s_BEH], - \[s:a_f_REH, s:a_s_BEH], - \[s:a_f_ZAIN, s:a_s_BEH], - \[s:a_f_WAW, s:a_s_BEH], - \[s:a_f_ALEF_MAKSURA, s:a_s_BEH], - \[s:a_f_BEH, s:a_f_BEH], - \[s:a_f_TEH, s:a_f_BEH], - \[s:a_f_THEH, s:a_f_BEH], - \[s:a_f_JEEM, s:a_f_BEH], - \[s:a_f_HAH, s:a_f_BEH], - \[s:a_f_KHAH, s:a_f_BEH], - \[s:a_f_SEEN, s:a_f_BEH], - \[s:a_f_SHEEN, s:a_f_BEH], - \[s:a_f_SAD, s:a_f_BEH], - \[s:a_f_DAD, s:a_f_BEH], - \[s:a_f_TAH, s:a_f_BEH], - \[s:a_f_ZAH, s:a_f_BEH], - \[s:a_f_AIN, s:a_f_BEH], - \[s:a_f_GHAIN, s:a_f_BEH], - \[s:a_f_FEH, s:a_f_BEH], - \[s:a_f_QAF, s:a_f_BEH], - \[s:a_f_KAF, s:a_f_BEH], - \[s:a_f_LAM, s:a_f_BEH], - \[s:a_f_MEEM, s:a_f_BEH], - \[s:a_f_NOON, s:a_f_BEH], - \[s:a_f_HEH, s:a_f_BEH], - \[s:a_f_YEH, s:a_f_BEH], - \ ] - call setline(1, ' ' . s:a_BEH . pair[0]) - call assert_equal([' ' . pair[1] . pair[0]], ScreenLines(1, 3)) - endfor - - set arabicshape& - bwipe! -endfunc - func Test_shape_combination_final() new set arabicshape -- cgit From 01e3690ca870276bfdc78d81a1bd75b7f1a78a9e Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 28 Jul 2019 20:36:51 -0400 Subject: vim-patch:8.1.1049: when user tries to exit with CTRL-C message is confusing Problem: When user tries to exit with CTRL-C message is confusing. Solution: Only mention ":qa!" when there is a changed buffer. (closes vim/vim#4163) https://github.com/vim/vim/commit/a84a3dd6635fcd2e07f510cba6a999585dcc381a vim-patch:8.1.1052: test for CTRL-C message sometimes fails Problem: test for CTRL-C message sometimes fails Solution: Make sure there are no changed buffers. https://github.com/vim/vim/commit/553e5a5c568e7d175b65b0472cd6d9843b25f4c8 vim-patch:8.1.1053: warning for missing return statement Problem: Warning for missing return statement. (Dominique Pelle) Solution: Add return statement. https://github.com/vim/vim/commit/d6c3f1fa2b5e1dd7dc87cf608d72b84ad696b58f --- src/nvim/testdir/test_normal.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_normal.vim b/src/nvim/testdir/test_normal.vim index ef17209f74..945cd5a617 100644 --- a/src/nvim/testdir/test_normal.vim +++ b/src/nvim/testdir/test_normal.vim @@ -2552,6 +2552,21 @@ func Test_delete_until_paragraph() bwipe! endfunc +func Test_message_when_using_ctrl_c() + " Make sure no buffers are changed. + %bwipe! + + exe "normal \" + call assert_match("Type :qa and press to exit Nvim", Screenline(&lines)) + + new + cal setline(1, 'hi!') + exe "normal \" + call assert_match("Type :qa! and press to abandon all changes and exit Nvim", Screenline(&lines)) + + bwipe! +endfunc + " Test for '[m', ']m', '[M' and ']M' " Jumping to beginning and end of methods in Java-like languages func Test_java_motion() -- cgit