aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJames McCoy <vega.james@gmail.com>2015-08-19 21:53:52 -0400
committerJames McCoy <vega.james@gmail.com>2015-08-20 10:32:25 -0400
commitf6f28c18e5824b13f4a20a481a9f350f0e652e9b (patch)
tree32a5dd8a94ae9891d9e3d3f65abdb14f75c8f108 /src/nvim/testdir
parent08bae4533704120199c188eb3cfac2b6ba4096c0 (diff)
downloadrneovim-f6f28c18e5824b13f4a20a481a9f350f0e652e9b.tar.gz
rneovim-f6f28c18e5824b13f4a20a481a9f350f0e652e9b.tar.bz2
rneovim-f6f28c18e5824b13f4a20a481a9f350f0e652e9b.zip
7.4.813
patch 7.4.813 Problem: It is not possible to save and restore character search state. Solution: Add getcharsearch() and setcharsearch(). (James McCoy) https://github.com/vim/vim/releases/tag/v7.4.813 https://github.com/vim/vim/releases/tag/v7.4.826 Signed-off-by: James McCoy <vega.james@gmail.com>
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/Makefile1
-rw-r--r--src/nvim/testdir/test_charsearch.in25
-rw-r--r--src/nvim/testdir/test_charsearch.ok3
3 files changed, 29 insertions, 0 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile
index c97ffc2ced..6af8893800 100644
--- a/src/nvim/testdir/Makefile
+++ b/src/nvim/testdir/Makefile
@@ -27,6 +27,7 @@ SCRIPTS := test_eval.out \
test88.out \
test_listlbr.out \
test_breakindent.out \
+ test_charsearch.out \
test_close_count.out \
test_command_count.out \
diff --git a/src/nvim/testdir/test_charsearch.in b/src/nvim/testdir/test_charsearch.in
new file mode 100644
index 0000000000..5085cb39bc
--- /dev/null
+++ b/src/nvim/testdir/test_charsearch.in
@@ -0,0 +1,25 @@
+Test for character searches
+
+STARTTEST
+:so small.vim
+:" check that "fe" and ";" work
+/^X
+ylfep;;p,,p:
+:" check that save/restore works
+/^Y
+ylfep:let csave = getcharsearch()
+fip:call setcharsearch(csave)
+;p;p:
+:" check that setcharsearch() changes the settins.
+/^Z
+ylfep:call setcharsearch({'char': 'k'})
+;p:call setcharsearch({'forward': 0})
+$;p:call setcharseearch({'until'}: 1})
+;;p:
+:/^X/,$w! test.out
+:qa!
+ENDTEST
+
+Xabcdefghijkemnopqretuvwxyz
+Yabcdefghijkemnopqretuvwxyz
+Zabcdefghijkemnokqretkvwxyz
diff --git a/src/nvim/testdir/test_charsearch.ok b/src/nvim/testdir/test_charsearch.ok
new file mode 100644
index 0000000000..a0c90e24f9
--- /dev/null
+++ b/src/nvim/testdir/test_charsearch.ok
@@ -0,0 +1,3 @@
+XabcdeXfghijkeXmnopqreXtuvwxyz
+YabcdeYfghiYjkeYmnopqreYtuvwxyz
+ZabcdeZfghijkZemnokZqretkZvwxyz