aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Hillegeer <nicolas@hillegeer.com>2014-07-22 21:10:12 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-07-27 14:00:45 -0300
commit1cfc468e5cbb7e703d7e39b6eadb614772fa81cb (patch)
tree5ca2f43db330e53455743b0a05052bcfdeef5dab
parentad4c1e19543a1804904826083128e3ad8cd248bd (diff)
downloadrneovim-1cfc468e5cbb7e703d7e39b6eadb614772fa81cb.tar.gz
rneovim-1cfc468e5cbb7e703d7e39b6eadb614772fa81cb.tar.bz2
rneovim-1cfc468e5cbb7e703d7e39b6eadb614772fa81cb.zip
test/helpers: allow interning Pascal strings
os_system() returns a Pascal string, for example (it also NUL-terminates the string, but that's neither here nor there).
-rw-r--r--test/unit/helpers.moon4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/helpers.moon b/test/unit/helpers.moon
index 438f36811c..8064537d93 100644
--- a/test/unit/helpers.moon
+++ b/test/unit/helpers.moon
@@ -88,9 +88,9 @@ cimport './src/nvim/types.h'
-- take a pointer to a C-allocated string and return an interned
-- version while also freeing the memory
-internalize = (cdata) ->
+internalize = (cdata, len) ->
ffi.gc cdata, ffi.C.free
- return ffi.string cdata
+ return ffi.string cdata, len
cstr = ffi.typeof 'char[?]'