summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-02-23 13:50:38 +0100
committerBram Moolenaar <Bram@vim.org>2017-02-23 13:50:38 +0100
commit218426896cbb2129aa4e85803ea97c5b57df1eaa (patch)
tree0ce0e802eedf00927b221f7915b0836023347ccb
parentae177b716626c8d517b7c6c7d77f8b1aec6ba5f9 (diff)
downloadvim-git-218426896cbb2129aa4e85803ea97c5b57df1eaa.tar.gz
patch 8.0.0351: no test for concatenating an empty stringv8.0.0351
Problem: No test for concatenating an empty string that results from out of bounds indexing. Solution: Add a simple test.
-rw-r--r--src/testdir/test_expr.vim5
-rw-r--r--src/version.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim
index e5c918c8c..80cdc1b0d 100644
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -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
diff --git a/src/version.c b/src/version.c
index bd271cc38..b51f04d40 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 351,
+/**/
350,
/**/
349,