summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_method.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_method.vim')
-rw-r--r--src/testdir/test_method.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_method.vim b/src/testdir/test_method.vim
index 120fade..f18ac14 100644
--- a/src/testdir/test_method.vim
+++ b/src/testdir/test_method.vim
@@ -136,6 +136,13 @@ func Test_method_syntax()
call assert_fails('eval [1, 2, 3] ->sort ()', 'E274:')
call assert_fails('eval [1, 2, 3]-> sort ()', 'E274:')
call assert_fails('eval [1, 2, 3]-> sort()', 'E274:')
+
+ " Test for using a method name containing a curly brace name
+ let s = 'len'
+ call assert_equal(4, "xxxx"->str{s}())
+
+ " Test for using a method in an interpolated string
+ call assert_equal('4', $'{"xxxx"->strlen()}')
endfunc
func Test_method_lambda()