]> granicus.if.org Git - vim/commitdiff
patch 8.0.0351: no test for concatenating an empty string v8.0.0351
authorBram Moolenaar <Bram@vim.org>
Thu, 23 Feb 2017 12:50:38 +0000 (13:50 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 23 Feb 2017 12:50:38 +0000 (13:50 +0100)
Problem:    No test for concatenating an empty string that results from out of
            bounds indexing.
Solution:   Add a simple test.

src/testdir/test_expr.vim
src/version.c

index e5c918c8c4218c5861717af5f8cdc8f8634abf73..80cdc1b0dbea6bf7dd6e60044cad2d3fcad31d59 100644 (file)
@@ -473,3 +473,8 @@ func Test_setmatches()
   call setmatches(set)
   call assert_equal(exp, getmatches())
 endfunc
+
+func Test_empty_concatenate()
+  call assert_equal('b', 'a'[4:0] . 'b')
+  call assert_equal('b', 'b' . 'a'[4:0])
+endfunc
index bd271cc38f7d5fe5b9fbeaacfcffd960cb39215a..b51f04d40b25a3d55013b1bf026fb70704e43070 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    351,
 /**/
     350,
 /**/