comparison src/testdir/test_blob.vim @ 26394:43d196ca5e7a v8.2.3728

patch 8.2.3728: internal error when passing range() to list2blob() Commit: https://github.com/vim/vim/commit/04b7b4bf7fe57375bf3c4ed3fd087fc0bb0147ba Author: kuuote <znmxodq1@gmail.com> Date: Fri Dec 3 13:57:00 2021 +0000 patch 8.2.3728: internal error when passing range() to list2blob() Problem: Internal error when passing range() to list2blob(). Solution: Materialize the list first. (closes https://github.com/vim/vim/issues/9262)
author Bram Moolenaar <Bram@vim.org>
date Fri, 03 Dec 2021 15:00:05 +0100
parents 42723b535ab3
children a3f38923c037
comparison
equal deleted inserted replaced
26393:070e77657c21 26394:43d196ca5e7a
673 call assert_fails('let b = list2blob([-1])', 'E1239:') 673 call assert_fails('let b = list2blob([-1])', 'E1239:')
674 call assert_fails('let b = list2blob([256])', 'E1239:') 674 call assert_fails('let b = list2blob([256])', 'E1239:')
675 let b = range(16)->repeat(64)->list2blob() 675 let b = range(16)->repeat(64)->list2blob()
676 call assert_equal(1024, b->len()) 676 call assert_equal(1024, b->len())
677 call assert_equal([4, 8, 15], [b[100], b[1000], b[1023]]) 677 call assert_equal([4, 8, 15], [b[100], b[1000], b[1023]])
678
678 call assert_equal(0z, list2blob(test_null_list())) 679 call assert_equal(0z, list2blob(test_null_list()))
679 endfunc 680 call assert_equal(0z00010203, list2blob(range(4)))
681 endfunc
682
680 683
681 " vim: shiftwidth=2 sts=2 expandtab 684 " vim: shiftwidth=2 sts=2 expandtab