patch 8.2.0212: missing search/substitute pattern hardly tested
Problem: Missing search/substitute pattern hardly tested.
Solution: Add test_clear_search_pat() and tests. (Yegappan Lakshmanan,
closes #5579)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 1d282d2..26e7d12 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2848,6 +2848,7 @@
test_alloc_fail({id}, {countdown}, {repeat})
none make memory allocation fail
test_autochdir() none enable 'autochdir' during startup
+test_clear_search_pat() none clears the last used search pattern
test_feedinput({string}) none add key sequence to input buffer
test_garbagecollect_now() none free memory right now for testing
test_garbagecollect_soon() none free memory soon for testing
diff --git a/runtime/doc/testing.txt b/runtime/doc/testing.txt
index c5fa2e8..7fb24e6 100644
--- a/runtime/doc/testing.txt
+++ b/runtime/doc/testing.txt
@@ -52,6 +52,11 @@
startup has finished.
+test_clear_search_pat() *test_clear_search_pat()*
+ Clears the last used search pattern (|/|) and the substitute
+ pattern (|:s|). This is useful for testing conditions where
+ these patterns are not set previously.
+
test_feedinput({string}) *test_feedinput()*
Characters in {string} are queued for processing as if they
were typed by the user. This uses a low level input buffer.
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 1bed01f..316eebc 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -963,6 +963,7 @@
assert_report() report a test failure
test_alloc_fail() make memory allocation fail
test_autochdir() enable 'autochdir' during startup
+ test_clear_search_pat() clears the last used search pattern
test_override() test with Vim internal overrides
test_garbagecollect_now() free memory right now
test_getvalue() get value of an internal variable