]> granicus.if.org Git - vim/commitdiff
patch 9.0.0134: no test for text property with column zero v9.0.0134
authorBram Moolenaar <Bram@vim.org>
Tue, 2 Aug 2022 10:48:53 +0000 (11:48 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 2 Aug 2022 10:48:53 +0000 (11:48 +0100)
Problem:    No test for text property with column zero.
Solution:   Add a test.  Add message to assert for no open popups.

src/testdir/runtest.vim
src/testdir/test_textprop.vim
src/version.c

index 69443c5f9d9223926bc337e056ac5e645b36f52c..c7140e53000e231036d37cfe33ce564d69196193 100644 (file)
@@ -245,7 +245,7 @@ func RunTheTest(test)
 
   " Check for and close any stray popup windows.
   if has('popupwin')
-    call assert_equal([], popup_list())
+    call assert_equal([], popup_list(), 'Popup is still present')
     call popup_clear(1)
   endif
 
index c05a963895efabf5aee180324cbc1e31617d5995..216ae20a41dc1fed5fd50f37a129476c18422e14 100644 (file)
@@ -1611,6 +1611,23 @@ func Test_prop_one_line_window()
   bwipe!
 endfunc
 
+def Test_prop_column_zero_error()
+  prop_type_add('proptype', {highlight: 'Search'})
+  var caught = false
+  try
+    popup_create([{
+            text: 'a',
+            props: [{col: 0, length: 1, type: 'type'}],
+     }], {})
+  catch /E964:/
+    caught = true
+  endtry
+  assert_true(caught)
+
+  popup_clear()
+  prop_type_delete('proptype')
+enddef
+
 " This was calling ml_append_int() and copy a text property from a previous
 " line at the wrong moment.  Exact text length matters.
 def Test_prop_splits_data_block()
index 75f24c66e6c2857bb8d67a3c19eb94557dda6ffb..6113e333fd7b76e509df5c164e95d01e4227387a 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    134,
 /**/
     133,
 /**/