grep_spec.lua 666 B

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