testtest_spec.lua 509 B

1234567891011121314151617181920
  1. local helpers = require('test.unit.helpers')(after_each)
  2. local assert = require('luassert')
  3. local itp = helpers.gen_itp(it)
  4. local sc = helpers.sc
  5. -- All of the below tests must fail. Check how exactly they fail.
  6. if os.getenv('NVIM_TEST_RUN_TESTTEST') ~= '1' then
  7. return
  8. end
  9. describe('test code', function()
  10. itp('does not hang when working with lengthy errors', function()
  11. assert.just_fail(('x'):rep(65536))
  12. end)
  13. itp('shows trace after exiting abnormally', function()
  14. sc.exit(0)
  15. end)
  16. end)