mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user