diff src/testdir/test_vim9_func.vim @ 22121:b50610a6aee0 v8.2.1610

patch 8.2.1610: Vim9: cannot pass "true" to list2str() and str2list() Commit: https://github.com/vim/vim/commit/a48f786787e8e070c1a611146fd1f0f7e141e60a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 5 20:16:57 2020 +0200 patch 8.2.1610: Vim9: cannot pass "true" to list2str() and str2list() Problem: Vim9: cannot pass "true" to list2str() and str2list(). Solution: Use tv_get_bool_chk(). (closes https://github.com/vim/vim/issues/6877)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Sep 2020 20:30:03 +0200
parents 6c3123ea53c3
children 978f91276449
line wrap: on
line diff
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -1522,6 +1522,13 @@ def Test_has()
   assert_equal(1, has('eval', true))
 enddef
 
+def Test_list2str_str2list_utf8()
+  let s = "\u3042\u3044"
+  let l = [0x3042, 0x3044]
+  assert_equal(l, str2list(s, true))
+  assert_equal(s, list2str(l, true))
+enddef
+
 def Fibonacci(n: number): number
   if n < 2
     return n