diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_matchfuzzy.vim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/old/testdir/test_matchfuzzy.vim b/test/old/testdir/test_matchfuzzy.vim index be5c629cf5..90f3366b23 100644 --- a/test/old/testdir/test_matchfuzzy.vim +++ b/test/old/testdir/test_matchfuzzy.vim @@ -2,6 +2,7 @@ source shared.vim source check.vim +source term_util.vim " Test for matchfuzzy() func Test_matchfuzzy() @@ -260,4 +261,30 @@ func Test_matchfuzzy_limit() call assert_equal([{'id': 5, 'val': 'crayon'}], l->matchfuzzy('c', #{key: 'val', limit: 1})) endfunc +" This was using uninitialized memory +func Test_matchfuzzy_initialized() + CheckRunVimInTerminal + + " This can take a very long time (esp. when using valgrind). Run in a + " separate Vim instance and kill it after two seconds. We only check for + " memory errors. + let lines =<< trim END + lvimgrep [ss [fg* + END + call writefile(lines, 'XTest_matchfuzzy', 'D') + + let buf = RunVimInTerminal('-u NONE -X -Z', {}) + call term_sendkeys(buf, ":source XTest_matchfuzzy\n") + call TermWait(buf, 2000) + + let job = term_getjob(buf) + if job_status(job) == "run" + call job_stop(job, "int") + call TermWait(buf, 50) + endif + + " clean up + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |