grep_spec.lua (617B)
1 local t = require('test.testutil') 2 local n = require('test.functional.testnvim')() 3 4 local clear, ok, eval = n.clear, t.ok, n.eval 5 6 describe(':grep', function() 7 before_each(clear) 8 9 it('does not hang on large input #2983', function() 10 if eval("executable('grep')") == 0 then 11 pending('missing "grep" command') 12 return 13 end 14 15 n.command([[set grepprg=grep\ -r]]) 16 -- Change to test directory so that the test does not run too long. 17 n.command('cd test') 18 n.feed(':grep a **/*<cr>') 19 n.feed('<cr>') -- Press ENTER 20 ok(eval('len(getqflist())') > 9000) -- IT'S OVER 9000!!1 21 end) 22 end)