Skip to content

Commit 0f62cf5

Browse files
committed
patch 8.1.0508: suspend test fails when run by root
Problem: Suspend test fails when run by root. Solution: Accept both '$' and '#' for the prompt. (James McCoy, closes #3590)
1 parent da1c11c commit 0f62cf5

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/testdir/test_suspend.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ func Test_suspend()
99

1010
let buf = term_start('/bin/sh')
1111
" Wait for shell prompt.
12-
call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
12+
call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
1313

1414
call term_sendkeys(buf, v:progpath
1515
\ . " --clean -X"
@@ -26,7 +26,7 @@ func Test_suspend()
2626
\ "\<C-Z>"]
2727
" Suspend and wait for shell prompt.
2828
call term_sendkeys(buf, suspend_cmd)
29-
call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
29+
call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
3030

3131
" Without 'autowrite', buffer should not be written.
3232
call assert_equal(0, filereadable('Xfoo'))
@@ -40,7 +40,7 @@ func Test_suspend()
4040
call assert_equal(0, filereadable('Xfoo'))
4141
call term_sendkeys(buf, ":suspend\<CR>")
4242
" Wait for shell prompt.
43-
call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
43+
call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
4444
call assert_equal(['foo'], readfile('Xfoo'))
4545
call term_sendkeys(buf, "fg\<CR>")
4646
call WaitForAssert({-> assert_equal(' 1 foo', term_getline(buf, '.'))})

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
508,
795797
/**/
796798
507,
797799
/**/

0 commit comments

Comments
 (0)