summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_erasebackword.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_erasebackword.vim')
-rw-r--r--src/testdir/test_erasebackword.vim25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/test_erasebackword.vim b/src/testdir/test_erasebackword.vim
new file mode 100644
index 0000000000..098d6edfcb
--- /dev/null
+++ b/src/testdir/test_erasebackword.vim
@@ -0,0 +1,25 @@
+
+func Test_erasebackword()
+ if !has('multi_byte')
+ return
+ endif
+
+ set encoding=utf-8
+ enew
+
+ exe "normal o wwwこんにちわ世界ワールドvim \<C-W>"
+ call assert_equal(' wwwこんにちわ世界ワールド', getline('.'))
+ exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>"
+ call assert_equal(' wwwこんにちわ世界', getline('.'))
+ exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>"
+ call assert_equal(' wwwこんにちわ', getline('.'))
+ exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>"
+ call assert_equal(' www', getline('.'))
+ exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>\<C-W>"
+ call assert_equal(' ', getline('.'))
+ exe "normal o wwwこんにちわ世界ワールドvim \<C-W>\<C-W>\<C-W>\<C-W>\<C-W>\<C-W>"
+ call assert_equal('', getline('.'))
+
+ enew!
+ set encoding&
+endfunc