File: testmksession_spec-use-bwipeout-instead-.patch

package info (click to toggle)
neovim 0.7.2-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 53,496 kB
  • sloc: ansic: 237,952; python: 3,358; sh: 2,080; awk: 704; makefile: 398; perl: 335; lisp: 129; xml: 63; ruby: 6
file content (50 lines) | stat: -rw-r--r-- 1,658 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From: zeertzjq <zeertzjq@outlook.com>
Date: Fri, 22 Jul 2022 12:59:34 +0800
X-Dgit-Generated: 0.7.2-4 9ec858e72191150c9ac179fcd0ae708bcafaa85c
Subject: test(mksession_spec): use %bwipeout! instead of qall! to close terminal (#19465)

Avoid expect_exit, session will be closed when a new one is spawned.

---

diff --git a/test/functional/ex_cmds/mksession_spec.lua b/test/functional/ex_cmds/mksession_spec.lua
index 2bec31d41..c8d5d780b 100644
--- a/test/functional/ex_cmds/mksession_spec.lua
+++ b/test/functional/ex_cmds/mksession_spec.lua
@@ -10,7 +10,6 @@ local funcs = helpers.funcs
 local matches = helpers.matches
 local pesc = helpers.pesc
 local rmdir = helpers.rmdir
-local expect_exit = helpers.expect_exit
 
 local file_prefix = 'Xtest-functional-ex_cmds-mksession_spec'
 
@@ -40,9 +39,9 @@ describe(':mksession', function()
     command('terminal')
     command('split')
     command('mksession '..session_file)
+    command('%bwipeout!')
 
     -- Create a new test instance of Nvim.
-    expect_exit(command, 'qall!')
     clear()
     -- Restore session.
     command('source '..session_file)
@@ -107,8 +106,7 @@ describe(':mksession', function()
     command('terminal echo $PWD')
     command('cd '..cwd_dir)
     command('mksession '..session_path)
-    command('bdelete!')
-    expect_exit(command, 'qall!')
+    command('%bwipeout!')
 
     -- Create a new test instance of Nvim.
     clear()
@@ -116,6 +114,6 @@ describe(':mksession', function()
 
     local expected_cwd = cwd_dir..'/'..tab_dir
     matches('^term://'..pesc(expected_cwd)..'//%d+:', funcs.expand('%'))
-    command('bdelete!')
+    command('%bwipeout!')
   end)
 end)