diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-20 21:20:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-20 21:20:34 -0700 |
commit | 5fc47b3d24f1fa568ffb54db8e8054f190e2fb2b (patch) | |
tree | 8943e009897bbd09b1c702234a001d69b38d9bcf /tests/017/glob-carray.expected | |
parent | 1bf2b4787766da146c6b32dffccca2a3b6b35273 (diff) | |
download | txr-5fc47b3d24f1fa568ffb54db8e8054f190e2fb2b.tar.gz txr-5fc47b3d24f1fa568ffb54db8e8054f190e2fb2b.tar.bz2 txr-5fc47b3d24f1fa568ffb54db8e8054f190e2fb2b.zip |
ffi: add two tests based on glob function.
One approach captures the paths as a carray of
strings, and explicitly frees it with globfree.
The other approach uses a zarray, taking advantage
of null termination. globfree is elided because TXR FFI
does the freeing; the types used declare to it that it
is taking ownership of a dynamically allocated vector of
dynamically allocated strings, and so it performs the
equivalent of globfree.
* tests/017/glob-carray.expected: New file.
* tests/017/glob-carray.tl: Likewise.
* tests/017/glob-zarray.expected: Likewise.
* tests/017/glob-zarray.tl: Likewise.
Diffstat (limited to 'tests/017/glob-carray.expected')
-rw-r--r-- | tests/017/glob-carray.expected | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/017/glob-carray.expected b/tests/017/glob-carray.expected new file mode 100644 index 00000000..ac1290e3 --- /dev/null +++ b/tests/017/glob-carray.expected @@ -0,0 +1,4 @@ +0 +#S(glob-t pathc 4 pathv #<carray 4 #<ffi-type str-d>> reserve 0) +#("tests/001/query-1.txr" "tests/001/query-2.txr" "tests/001/query-3.txr" + "tests/001/query-4.txr") |