diff options
Diffstat (limited to 'tests/017/glob-zarray.tl')
-rw-r--r-- | tests/017/glob-zarray.tl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/017/glob-zarray.tl b/tests/017/glob-zarray.tl new file mode 100644 index 00000000..b6e16d13 --- /dev/null +++ b/tests/017/glob-zarray.tl @@ -0,0 +1,17 @@ +(load "../common") + +(defstruct glob-t nil + pathc pathv reserve) + +(deffi-type glob-t (struct glob-t + (pathc size-t) + (pathv (ptr-out-d (zarray str-d))) + (reserve size-t))) + +(with-dyn-lib (libc) + (deffi globb "glob" int (str int closure (ptr-out glob-t))) + (deffi-cb glob-cb int (str int) -1)) + +(let* ((g (new glob-t))) + (prinl (globb "tests/001/*.txr" 0 (glob-cb (lambda (path err))) g)) + (prinl g)) |