comparison src/testdir/test_vim9_func.vim @ 22107:679269735ec3 v8.2.1603

patch 8.2.1603: Vim9: cannot use "true" with getchar() Commit: https://github.com/vim/vim/commit/c08cc72947fdfab484f53c5d9bbea662bc5a9c8f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 5 17:51:23 2020 +0200 patch 8.2.1603: Vim9: cannot use "true" with getchar() Problem: Vim9: cannot use "true" with getchar(). Solution: use tv_get_bool_chk(). (closes https://github.com/vim/vim/issues/6874)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Sep 2020 18:00:04 +0200
parents bae2a3fa141f
children 3785043f8768
comparison
equal deleted inserted replaced
22106:fbcfa658f056 22107:679269735ec3
1503 getbufinfo(#{bufloaded: true, buflisted: true, bufmodified: false}) 1503 getbufinfo(#{bufloaded: true, buflisted: true, bufmodified: false})
1504 ->len()->assert_equal(3) 1504 ->len()->assert_equal(3)
1505 bwipe Xtestfile1 Xtestfile2 1505 bwipe Xtestfile1 Xtestfile2
1506 enddef 1506 enddef
1507 1507
1508 def Test_getchar()
1509 assert_equal(0, getchar(true))
1510 enddef
1511
1508 def Fibonacci(n: number): number 1512 def Fibonacci(n: number): number
1509 if n < 2 1513 if n < 2
1510 return n 1514 return n
1511 else 1515 else
1512 return Fibonacci(n - 1) + Fibonacci(n - 2) 1516 return Fibonacci(n - 1) + Fibonacci(n - 2)