summaryrefslogtreecommitdiff
path: root/src/testdir/test34.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-30 18:54:39 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-30 18:54:39 +0000
commitc9b4b05b3544b434730eb218e848a1a441d5ffb2 (patch)
treec1550ddf398d2030ed25ee98e8342fcb41ac1c87 /src/testdir/test34.in
parentaa35dd1667c5903cdcc32ebe10f27bc6683c68a1 (diff)
downloadvim-c9b4b05b3544b434730eb218e848a1a441d5ffb2.zip
updated for version 7.0g
Diffstat (limited to 'src/testdir/test34.in')
-rw-r--r--src/testdir/test34.in31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/testdir/test34.in b/src/testdir/test34.in
index 676070075..4781fecee 100644
--- a/src/testdir/test34.in
+++ b/src/testdir/test34.in
@@ -1,4 +1,5 @@
-Test for user functions
+Test for user functions.
+Also test an <expr> mapping calling a function.
STARTTEST
:so small.vim
@@ -18,6 +19,27 @@ STARTTEST
: exe "let g:" . a:divname . " = ". a:n1 / a:n2
: return "ok"
:endfunction
+:func Expr1()
+: normal! v
+: return "111"
+:endfunc
+:func Expr2()
+: call search('XX', 'b')
+: return "222"
+:endfunc
+:func ListItem()
+: let g:counter += 1
+: return g:counter . '. '
+:endfunc
+:func ListReset()
+: let g:counter = 0
+: return ''
+:endfunc
+:let counter = 0
+:inoremap <expr> ( ListItem()
+:inoremap <expr> [ ListReset()
+:imap <expr> + Expr1()
+:imap <expr> * Expr2()
:let retval = "nop"
/^here
C=Table("xxx", 4, "asdf")
@@ -25,7 +47,12 @@ C=Table("xxx", 4, "asdf")
=retval
=Compute(45, 5, "retval")
=retval
-:.wq! test.out
+
+XX+-XX
+---*---
+(one
+(two
+[(one again:$-5,$wq! test.out
ENDTEST
here