File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
samples/distro-examples/tests Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -60,3 +60,12 @@ if (9 != ubound(a)) then
6060 throw " Final empty entry was ignored"
6161endif
6262
63+ row = " "
64+ split row, " :" , fields ()
65+ if (len (fields ) != 0 ) then throw " Empty input gave non-empty output"
66+
67+ s =" $$$1$2$3$4$5$$$6$7$"
68+ split s, " !@#$%^" , a
69+ if (ubound (a ) - lbound (a ) != len (a ) - 1 ) then throw " Dimension error"
70+
71+
Original file line number Diff line number Diff line change @@ -2249,10 +2249,11 @@ void cmd_wsplit() {
22492249 elem_p = v_elem (var_p , count );
22502250 if (* ps ) {
22512251 v_setstr (elem_p , ps );
2252- } else {
2252+ count ++ ;
2253+ } else if (count ) {
22532254 v_setstr (elem_p , "" );
2255+ count ++ ;
22542256 }
2255- count ++ ;
22562257
22572258 // final resize
22582259 v_resize_array (var_p , count );
You can’t perform that action at this time.
0 commit comments