-*builtin.txt* For Vim version 9.1. Last change: 2025 Jan 16
+*builtin.txt* For Vim version 9.1. Last change: 2025 Jan 17
VIM REFERENCE MANUAL by Bram Moolenaar
bindtextdomain({package}, {path})
Bool bind text domain to specified path
blob2list({blob}) List convert {blob} into a list of numbers
-blob2str({blob} [, {options}]) String convert {blob} into a list of strings
+blob2str({blob} [, {options}]) List convert {blob} into a list of strings
browse({save}, {title}, {initdir}, {default})
String put up a file requester
browsedir({title}, {initdir}) String put up a directory requester
{"blob2list", 1, 1, FEARG_1, arg1_blob,
ret_list_number, f_blob2list},
{"blob2str", 1, 2, FEARG_1, arg2_blob_dict,
- ret_string, f_blob2str},
+ ret_list_string, f_blob2str},
{"browse", 4, 4, 0, arg4_browse,
ret_string, f_browse},
{"browsedir", 2, 2, 0, arg2_string,
v9.CheckSourceDefAndScriptFailure(['blob2list(10)'], ['E1013: Argument 1: type mismatch, expected blob but got number', 'E1238: Blob required for argument 1'])
enddef
+def Test_blob2str()
+ 0z6162->blob2str()->assert_equal(["ab"])
+ blob2str(0z)->assert_equal([])
+
+ var l: list<string> = blob2str(0zC2ABC2BB)
+ assert_equal(["«»"], l)
+
+ v9.CheckSourceDefAndScriptFailure(['blob2str("ab")'], ['E1013: Argument 1: type mismatch, expected blob but got string', 'E1238: Blob required for argument 1'])
+enddef
+
def Test_browse()
CheckFeature browse
assert_equal('', state('a'))
enddef
+def Test_str2blob()
+ ["ab"]->str2blob()->assert_equal(0z6162)
+ str2blob([""])->assert_equal(0z)
+
+ v9.CheckSourceDefAndScriptFailure(['str2blob("ab")'], ['E1013: Argument 1: type mismatch, expected list<string> but got string', 'E1211: List required for argument 1'])
+enddef
+
def Test_str2float()
str2float("1.00")->assert_equal(1.00)
str2float("2e-2")->assert_equal(0.02)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1025,
/**/
1024,
/**/