aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_arabic.vim48
-rw-r--r--src/nvim/testdir/test_normal.vim15
-rw-r--r--src/nvim/testdir/test_registers.vim9
3 files changed, 22 insertions, 50 deletions
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
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 \<C-C>"
+ call assert_match("Type :qa and press <Enter> to exit Nvim", Screenline(&lines))
+
+ new
+ cal setline(1, 'hi!')
+ exe "normal \<C-C>"
+ call assert_match("Type :qa! and press <Enter> 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()
diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim
index 414244768a..298268a994 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 = "\<Esc>OQ"
call feedkeys("qqiTest\<Esc>", "xt")
call feedkeys("OQuirk\<Esc>q", "xt")
call feedkeys("Go\<Esc>@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