]> granicus.if.org Git - vim/commitdiff
patch 8.2.3092: Vim9: builtin function test fails without +channel feature v8.2.3092
authorDominique Pelle <dominique.pelle@gmail.com>
Sat, 3 Jul 2021 17:27:37 +0000 (19:27 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 3 Jul 2021 17:27:37 +0000 (19:27 +0200)
Problem:    Vim9: builtin function test fails without the +channel feature.
Solution:   Check the +channel feature is supported. (Dominique PellĂ©,
            closes #8507)

runtime/doc/eval.txt
src/testdir/test_vim9_builtin.vim
src/version.c

index 2eceece64b8ce60fddc2d2b3a649f6774f2ea014..401f055f7d4f2049c98ab174f6d5c5d060947523 100644 (file)
@@ -8219,6 +8219,8 @@ prompt_getprompt({buf})                                   *prompt_getprompt()*
                Can also be used as a |method|: >
                        GetBuffer()->prompt_getprompt()
 
+<              {only available when compiled with the |+channel| feature}
+
 
 prompt_setcallback({buf}, {expr})                      *prompt_setcallback()*
                Set prompt callback for buffer {buf} to {expr}.  When {expr}
@@ -8252,6 +8254,7 @@ prompt_setcallback({buf}, {expr})                 *prompt_setcallback()*
 <              Can also be used as a |method|: >
                        GetBuffer()->prompt_setcallback(callback)
 
+<              {only available when compiled with the |+channel| feature}
 
 prompt_setinterrupt({buf}, {expr})                     *prompt_setinterrupt()*
                Set a callback for buffer {buf} to {expr}.  When {expr} is an
@@ -8265,6 +8268,8 @@ prompt_setinterrupt({buf}, {expr})                        *prompt_setinterrupt()*
                Can also be used as a |method|: >
                        GetBuffer()->prompt_setinterrupt(callback)
 
+<              {only available when compiled with the |+channel| feature}
+
 prompt_setprompt({buf}, {text})                                *prompt_setprompt()*
                Set prompt for buffer {buf} to {text}.  You most likely want
                {text} to end in a space.
@@ -8275,6 +8280,8 @@ prompt_setprompt({buf}, {text})                           *prompt_setprompt()*
                Can also be used as a |method|: >
                        GetBuffer()->prompt_setprompt('command: ')
 
+<              {only available when compiled with the |+channel| feature}
+
 prop_ functions are documented here: |text-prop-functions|
 
 pum_getpos()                                           *pum_getpos()*
index 5a5b512d8c9f3ddaa9be44a1cc173dfabe2514ad..38bd8271c8eb0683267710e3fb5c9e685a8de640 100644 (file)
@@ -1344,8 +1344,10 @@ def Test_prevnonblank()
 enddef
 
 def Test_prompt_getprompt()
-  CheckDefFailure(['prompt_getprompt([])'], 'E1013: Argument 1: type mismatch, expected string but got list<unknown>')
-  assert_equal('', prompt_getprompt('NonExistingBuf'))
+  if has('channel')
+    CheckDefFailure(['prompt_getprompt([])'], 'E1013: Argument 1: type mismatch, expected string but got list<unknown>')
+    assert_equal('', prompt_getprompt('NonExistingBuf'))
+  endif
 enddef
 
 def Test_rand()
index 5f07483581d1c7b89f1b4cfe42ce61430f919bdd..0d4fc1242df7ff84505f4e4b52125dcfc8cf526f 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3092,
 /**/
     3091,
 /**/