diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-05 20:38:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-05 20:38:22 +0100 |
commit | 07ada5ff2fd8f22ed3233ae5c4ddf87c7b3f56fe (patch) | |
tree | 0be9740166fea1f37b2a447558c7eed059b5a671 /src/testing.c | |
parent | 94255df057afa0b7dde77612f3274d4440871bd1 (diff) | |
download | vim-git-07ada5ff2fd8f22ed3233ae5c4ddf87c7b3f56fe.tar.gz |
patch 8.2.0212: missing search/substitute pattern hardly testedv8.2.0212
Problem: Missing search/substitute pattern hardly tested.
Solution: Add test_clear_search_pat() and tests. (Yegappan Lakshmanan,
closes #5579)
Diffstat (limited to 'src/testing.c')
-rw-r--r-- | src/testing.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testing.c b/src/testing.c index 5dacf073b..c2b382b8b 100644 --- a/src/testing.c +++ b/src/testing.c @@ -632,6 +632,19 @@ f_test_autochdir(typval_T *argvars UNUSED, typval_T *rettv UNUSED) } /* + * "test_clear_search_pat()" + * Free the last search and substitute patterns + */ + void +f_test_clear_search_pat(typval_T *argvars UNUSED, typval_T *rettv UNUSED) +{ + free_last_pat(RE_SUBST); + free_last_pat(RE_SEARCH); + set_old_sub(NULL); + free_regexp_prev_sub(); +} + +/* * "test_feedinput()" */ void |