Mercurial > vim
diff src/testdir/test_vim9_func.vim @ 22002:c9517003821d v8.2.1550
patch 8.2.1550: Vim9: bufname('%') gives an error
Commit: https://github.com/vim/vim/commit/02aaad91094939758e053588dd23ebda467eea29
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 30 21:26:57 2020 +0200
patch 8.2.1550: Vim9: bufname('%') gives an error
Problem: Vim9: bufname('%') gives an error.
Solution: Only give an error for wrong argument type. (closes https://github.com/vim/vim/issues/6807)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 30 Aug 2020 21:30:03 +0200 |
parents | ba2415df82d7 |
children | a9e60176dcd3 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim +++ b/src/testdir/test_vim9_func.vim @@ -1435,6 +1435,14 @@ def Test_setreg() assert_equal(reginfo, getreginfo('a')) enddef +def Test_bufname() + split SomeFile + assert_equal('SomeFile', bufname('%')) + edit OtherFile + assert_equal('SomeFile', bufname('#')) + close +enddef + def Fibonacci(n: number): number if n < 2 return n