summaryrefslogtreecommitdiff
path: root/src/testdir/test_charsearch.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-08-11 14:26:19 +0200
committerBram Moolenaar <Bram@vim.org>2015-08-11 14:26:19 +0200
commitdbd24b59678dd976b2ad356451e248a6e8b8bd8b (patch)
tree0ecfb9bb16fceefa3d1d101a8bb9cfe9db2e55f2 /src/testdir/test_charsearch.in
parentfbd302ff38624abdec64980f4a19379d20a6e6c6 (diff)
downloadvim-git-dbd24b59678dd976b2ad356451e248a6e8b8bd8b.tar.gz
patch 7.4.813v7.4.813
Problem: It is not possible to save and restore character search state. Solution: Add getcharsearch() and setcharsearch(). (James McCoy)
Diffstat (limited to 'src/testdir/test_charsearch.in')
-rw-r--r--src/testdir/test_charsearch.in25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/test_charsearch.in b/src/testdir/test_charsearch.in
new file mode 100644
index 000000000..5085cb39b
--- /dev/null
+++ b/src/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