patch 8.1.1044: no way to check the reference count of objects
Problem: No way to check the reference count of objects.
Solution: Add test_refcount(). (Ozaki Kiichi, closes #4124)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index fe10e34..6238723 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2672,6 +2672,7 @@
test_null_string() String null value for testing
test_option_not_set({name}) none reset flag indicating option was set
test_override({expr}, {val}) none test with Vim internal overrides
+test_refcount({expr}) Number get the reference count of {expr}
test_scrollbar({which}, {value}, {dragging})
none scroll in the GUI for testing
test_settime({expr}) none set current time for testing
@@ -9589,6 +9590,11 @@
< The value of "starting" is saved. It is restored by: >
call test_override('starting', 0)
+test_refcount({expr}) *test_refcount()*
+ Return the reference count of {expr}. When {expr} is of a
+ type that does not have a reference count, returns -1. Only
+ to be used for testing.
+
test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
Pretend using scrollbar {which} to move it to position
{value}. {which} can be: