]> granicus.if.org Git - vim/commitdiff
patch 8.1.0508: suspend test fails when run by root v8.1.0508
authorBram Moolenaar <Bram@vim.org>
Sat, 3 Nov 2018 20:09:15 +0000 (21:09 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 3 Nov 2018 20:09:15 +0000 (21:09 +0100)
Problem:    Suspend test fails when run by root.
Solution:   Accept both '$' and '#' for the prompt. (James McCoy, closes #3590)

src/testdir/test_suspend.vim
src/version.c

index 462173e8cc2f9df3a0559439319bc0c43959f502..a9964b04000ad251357e6b5f0ee7d282e60d0a62 100644 (file)
@@ -9,7 +9,7 @@ func Test_suspend()
 
   let buf = term_start('/bin/sh')
   " Wait for shell prompt.
-  call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
+  call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
 
   call term_sendkeys(buf, v:progpath
         \               . " --clean -X"
@@ -26,7 +26,7 @@ func Test_suspend()
         \             "\<C-Z>"]
     " Suspend and wait for shell prompt.
     call term_sendkeys(buf, suspend_cmd)
-    call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
+    call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
 
     " Without 'autowrite', buffer should not be written.
     call assert_equal(0, filereadable('Xfoo'))
@@ -40,7 +40,7 @@ func Test_suspend()
   call assert_equal(0, filereadable('Xfoo'))
   call term_sendkeys(buf, ":suspend\<CR>")
   " Wait for shell prompt.
-  call WaitForAssert({-> assert_match('$ $', term_getline(buf, '.'))})
+  call WaitForAssert({-> assert_match('[$#] $', term_getline(buf, '.'))})
   call assert_equal(['foo'], readfile('Xfoo'))
   call term_sendkeys(buf, "fg\<CR>")
   call WaitForAssert({-> assert_equal('  1 foo', term_getline(buf, '.'))})
index 28f39d4b936b2299ade94d4f260d5ee935493473..1e66b3ed78a57fe74737e973a92b40f929d3af22 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    508,
 /**/
     507,
 /**/