comparison 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
comparison
equal deleted inserted replaced
22001:b77a58769130 22002:c9517003821d
1433 let reginfo = getreginfo('a') 1433 let reginfo = getreginfo('a')
1434 setreg('a', reginfo) 1434 setreg('a', reginfo)
1435 assert_equal(reginfo, getreginfo('a')) 1435 assert_equal(reginfo, getreginfo('a'))
1436 enddef 1436 enddef
1437 1437
1438 def Test_bufname()
1439 split SomeFile
1440 assert_equal('SomeFile', bufname('%'))
1441 edit OtherFile
1442 assert_equal('SomeFile', bufname('#'))
1443 close
1444 enddef
1445
1438 def Fibonacci(n: number): number 1446 def Fibonacci(n: number): number
1439 if n < 2 1447 if n < 2
1440 return n 1448 return n
1441 else 1449 else
1442 return Fibonacci(n - 1) + Fibonacci(n - 2) 1450 return Fibonacci(n - 1) + Fibonacci(n - 2)