Mercurial > vim
comparison src/testdir/test_suspend.vim @ 21765:08940efa6b4e v8.2.1432
patch 8.2.1432: various inconsistencies in test files
Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 12 18:50:36 2020 +0200
patch 8.2.1432: various inconsistencies in test files
Problem: Various inconsistencies in test files.
Solution: Add modelines where they were missing. Use Check commands instead
of silently skipping over tests. Adjust indents and comments.
(Ken Takata, closes #6695)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Aug 2020 19:00:08 +0200 |
parents | c087099e9163 |
children | a916fca16d4b |
comparison
equal
deleted
inserted
replaced
21764:476b6faad407 | 21765:08940efa6b4e |
---|---|
1 " Test :suspend | 1 " Test :suspend |
2 | 2 |
3 source shared.vim | 3 source check.vim |
4 source term_util.vim | 4 source term_util.vim |
5 | 5 |
6 func CheckSuspended(buf, fileExists) | 6 func CheckSuspended(buf, fileExists) |
7 call WaitForAssert({-> assert_match('[$#] $', term_getline(a:buf, '.'))}) | 7 call WaitForAssert({-> assert_match('[$#] $', term_getline(a:buf, '.'))}) |
8 | 8 |
16 call term_sendkeys(a:buf, "fg\<CR>\<C-L>") | 16 call term_sendkeys(a:buf, "fg\<CR>\<C-L>") |
17 call WaitForAssert({-> assert_equal(' 1 foo', term_getline(a:buf, '.'))}) | 17 call WaitForAssert({-> assert_equal(' 1 foo', term_getline(a:buf, '.'))}) |
18 endfunc | 18 endfunc |
19 | 19 |
20 func Test_suspend() | 20 func Test_suspend() |
21 if !has('terminal') || !executable('/bin/sh') | 21 CheckFeature terminal |
22 return | 22 CheckExecutable /bin/sh |
23 endif | |
24 | 23 |
25 let buf = term_start('/bin/sh') | 24 let buf = term_start('/bin/sh') |
26 " Wait for shell prompt. | 25 " Wait for shell prompt. |
27 call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))}) | 26 call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))}) |
28 | 27 |
59 call StopShellInTerminal(buf) | 58 call StopShellInTerminal(buf) |
60 | 59 |
61 exe buf . 'bwipe!' | 60 exe buf . 'bwipe!' |
62 call delete('Xfoo') | 61 call delete('Xfoo') |
63 endfunc | 62 endfunc |
63 | |
64 " vim: shiftwidth=2 sts=2 expandtab |