summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0769
blob: fd5fbdd56a8b5fc237bb653df1c7299836b7bd67 (plain)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0769
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0769
Problem:    :stop is covered in two tests.
Solution:   Remove Test_stop_in_terminal().  Make other test exit Vim cleanly.
            (Ozaki Kiichi, closes #3814)
Files:	    src/testdir/test_terminal.vim, src/testdir/test_suspend.vim


*** ../vim-8.1.0768/src/testdir/test_terminal.vim	2019-01-09 23:00:58.001176090 +0100
--- src/testdir/test_terminal.vim	2019-01-17 22:11:01.022070824 +0100
***************
*** 1690,1728 ****
    call delete('Xfile')
  endfunc
  
- func Test_stop_in_terminal()
-   " We can't expect this to work on all systems, just test on Linux for now.
-   if !has('unix') || system('uname') !~ 'Linux'
-     return
-   endif
-   term /bin/sh
-   let bufnr = bufnr('')
-   call WaitForAssert({-> assert_equal('running', term_getstatus(bufnr))})
-   let lastrow = term_getsize(bufnr)[0]
- 
-   call term_sendkeys(bufnr, GetVimCommandClean() . "\r")
-   call term_sendkeys(bufnr, ":echo 'ready'\r")
-   call WaitForAssert({-> assert_match('ready', Get_terminal_text(bufnr, lastrow))})
- 
-   call term_sendkeys(bufnr, ":stop\r")
-   " Not sure where "Stopped" shows up, need five lines for Arch.
-   call WaitForAssert({-> assert_match('Stopped',
- 	\ Get_terminal_text(bufnr, 1) . 
- 	\ Get_terminal_text(bufnr, 2) . 
- 	\ Get_terminal_text(bufnr, 3) . 
- 	\ Get_terminal_text(bufnr, 4) . 
- 	\ Get_terminal_text(bufnr, 5))})
- 
-   call term_sendkeys(bufnr, "fg\r")
-   call term_sendkeys(bufnr, ":echo 'back again'\r")
-   call WaitForAssert({-> assert_match('back again', Get_terminal_text(bufnr, lastrow))})
- 
-   call term_sendkeys(bufnr, ":quit\r")
-   call term_wait(bufnr)
-   call Stop_shell_in_terminal(bufnr)
-   exe bufnr . 'bwipe'
- endfunc
- 
  func Test_terminal_no_job()
    let term = term_start('false', {'term_finish': 'close'})
    call WaitForAssert({-> assert_equal(v:null, term_getjob(term)) })
--- 1690,1695 ----
*** ../vim-8.1.0768/src/testdir/test_suspend.vim	2018-11-03 21:09:11.703978920 +0100
--- src/testdir/test_suspend.vim	2019-01-17 22:12:42.549139836 +0100
***************
*** 45,51 ****
    call term_sendkeys(buf, "fg\<CR>")
    call WaitForAssert({-> assert_equal('  1 foo', term_getline(buf, '.'))})
  
    exe buf . 'bwipe!'
    call delete('Xfoo')
-   set autowrite&
  endfunc
--- 45,55 ----
    call term_sendkeys(buf, "fg\<CR>")
    call WaitForAssert({-> assert_equal('  1 foo', term_getline(buf, '.'))})
  
+   " Quit gracefully to dump coverage information.
+   call term_sendkeys(buf, ":qall!\<CR>")
+   call term_wait(buf)
+   call Stop_shell_in_terminal(buf)
+ 
    exe buf . 'bwipe!'
    call delete('Xfoo')
  endfunc
*** ../vim-8.1.0768/src/version.c	2019-01-17 21:09:02.049706334 +0100
--- src/version.c	2019-01-17 22:13:42.644601977 +0100
***************
*** 793,794 ****
--- 793,796 ----
  {   /* Add new patch number below this line */
+ /**/
+     769,
  /**/

-- 
Marriage isn't a word.  It's a sentence.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///