patch 8.2.0615: regexp benchmark stest is old style
Problem: Regexp benchmark stest is old style.
Solution: Make it a new style test. Fix using a NULL list. Add more tests.
(Yegappan Lakshmanan, closes #5963)
diff --git a/src/evalbuffer.c b/src/evalbuffer.c
index 2c20939..f11727c 100644
--- a/src/evalbuffer.c
+++ b/src/evalbuffer.c
@@ -176,6 +176,13 @@
if (lines->v_type == VAR_LIST)
{
l = lines->vval.v_list;
+ if (l == NULL || list_len(l) == 0)
+ {
+ // set proper return code
+ if (lnum > curbuf->b_ml.ml_line_count)
+ rettv->vval.v_number = 1; // FAIL
+ goto done;
+ }
range_list_materialize(l);
li = l->lv_first;
}
@@ -251,6 +258,7 @@
update_topline();
}
+done:
if (!is_curbuf)
{
curbuf = curbuf_save;