diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-01-15 09:34:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-15 09:34:21 +0800 |
commit | 6134c1e8a39a5e61d0593613343a5923a86e3545 (patch) | |
tree | f8aab73024ac318d0aff9325ddb6c49b07497d78 /test/functional/core/fileio_spec.lua | |
parent | 2f32b1996744b8ad4ab00f11e09f17c27ad7d866 (diff) | |
download | rneovim-6134c1e8a39a5e61d0593613343a5923a86e3545.tar.gz rneovim-6134c1e8a39a5e61d0593613343a5923a86e3545.tar.bz2 rneovim-6134c1e8a39a5e61d0593613343a5923a86e3545.zip |
test(fileio_spec): avoid expect_exit() without calling clear() (#21810)
Since before_each() doesn't call clear() in these tests, after_each()
may call expect_exit() without calling clear() if a test is skipped,
causing frequent test failures on Cirrus CI. Close the session instead.
Diffstat (limited to 'test/functional/core/fileio_spec.lua')
-rw-r--r-- | test/functional/core/fileio_spec.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua index ed37032f25..bbf2202f0d 100644 --- a/test/functional/core/fileio_spec.lua +++ b/test/functional/core/fileio_spec.lua @@ -22,6 +22,7 @@ local tmpname = helpers.tmpname local trim = helpers.trim local currentdir = helpers.funcs.getcwd local assert_alive = helpers.assert_alive +local check_close = helpers.check_close local expect_exit = helpers.expect_exit local write_file = helpers.write_file local Screen = require('test.functional.ui.screen') @@ -34,7 +35,7 @@ describe('fileio', function() before_each(function() end) after_each(function() - expect_exit(command, ':qall!') + check_close() os.remove('Xtest_startup_shada') os.remove('Xtest_startup_file1') os.remove('Xtest_startup_file1~') @@ -270,7 +271,7 @@ describe('tmpdir', function() end) after_each(function() - expect_exit(command, ':qall!') + check_close() os.remove(testlog) end) |