summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_edit.vim
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2022-05-05 20:46:47 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-05 20:46:47 +0100
commitdfbdadce44b754cfa9f55111bdc44bb6a5d6b320 (patch)
tree0c0c4a541902bf77a13cd0e36c2da03855ae80cc /src/testdir/test_edit.vim
parent40fd7e665260c9227d6d90b17a301a1bc47f7f5b (diff)
patch 8.2.4876: MS-Windows: Shift-BS results in strange char in powershellv8.2.4876
Problem: MS-Windows: Shift-BS results in strange character in powershell. Solution: Add K_S_BS. (Christian Brabandt, closes #10283, closes #10279)
Diffstat (limited to 'src/testdir/test_edit.vim')
-rw-r--r--src/testdir/test_edit.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim
index 9ed899d838..dddffa3891 100644
--- a/src/testdir/test_edit.vim
+++ b/src/testdir/test_edit.vim
@@ -2148,5 +2148,31 @@ func Test_edit_overlong_file_name()
bwipe!
endfunc
+func Test_edit_shift_bs()
+ CheckMSWindows
+
+ " FIXME: this works interactively, but the test fails
+ throw 'Skipped: Shift-Backspace Test not working correctly :('
+
+ " Need to run this in Win32 Terminal, do not use CheckRunVimInTerminal
+ if !has("terminal")
+ return
+ endif
+
+ " Shift Backspace should work like Backspace in insert mode
+ let lines =<< trim END
+ call setline(1, ['abc'])
+ END
+ call writefile(lines, 'Xtest_edit_shift_bs')
+
+ let buf = RunVimInTerminal('-S Xtest_edit_shift_bs', #{rows: 3})
+ call term_sendkeys(buf, "A\<S-BS>-\<esc>")
+ call TermWait(buf, 50)
+ call assert_equal('ab-', term_getline(buf, 1))
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_edit_shift_bs')
+endfunc
" vim: shiftwidth=2 sts=2 expandtab