vim-patch:7.4.944

Problem:    Writing tests for Vim script is hard.
Solution:   Add assertEqual(), assertFalse() and assertTrue() functions.  Add
            the v:errors variable.  Add the runtest script. Add a first new
            style test script.

43345546ae
This commit is contained in:
watiko
2015-12-13 12:19:54 +09:00
parent 50db0312f9
commit 593df501b3
8 changed files with 262 additions and 5 deletions

View File

@@ -174,6 +174,7 @@ char_u* ga_concat_strings(const garray_T *gap) FUNC_ATTR_NONNULL_RET
}
/// Concatenate a string to a growarray which contains characters.
/// When "s" is NULL does not do anything.
///
/// WARNING:
/// - Does NOT copy the NUL at the end!
@@ -183,6 +184,10 @@ char_u* ga_concat_strings(const garray_T *gap) FUNC_ATTR_NONNULL_RET
/// @param s
void ga_concat(garray_T *gap, const char_u *restrict s)
{
if (s == NULL) {
return;
}
int len = (int)strlen((char *) s);
if (len) {
ga_grow(gap, len);