summaryrefslogtreecommitdiffstats
path: root/tests/017/glob-carray.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-21 14:18:02 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-05-21 14:18:02 -0700
commit53fd7bd43eb9a513f5a81f9ebbd99a7cc4172430 (patch)
treeb8cb3cbce20950aa3c73506ed36c0ff082b97c4d /tests/017/glob-carray.tl
parentb963e5050aaa83ac59c323a2a0382aa6637f1338 (diff)
downloadtxr-53fd7bd43eb9a513f5a81f9ebbd99a7cc4172430.tar.gz
txr-53fd7bd43eb9a513f5a81f9ebbd99a7cc4172430.tar.bz2
txr-53fd7bd43eb9a513f5a81f9ebbd99a7cc4172430.zip
ffi: port glob tests to Darwin.
* tests/017/glob-carray.tl (glob-t): Initialize reserve member to 0. Since it doesn't exist on Darwin, it will stay nil, and change the the test output. A Darwin variant of the corresponding FFI type is provided. * tests/017/glob-zarray.tl (glob-t): Likewise.
Diffstat (limited to 'tests/017/glob-carray.tl')
-rw-r--r--tests/017/glob-carray.tl19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/017/glob-carray.tl b/tests/017/glob-carray.tl
index 3c68ac1a..f98359a8 100644
--- a/tests/017/glob-carray.tl
+++ b/tests/017/glob-carray.tl
@@ -1,12 +1,21 @@
(load "../common")
(defstruct glob-t nil
- pathc pathv reserve)
+ pathc pathv (reserve 0))
-(deffi-type glob-t (struct glob-t
- (pathc size-t)
- (pathv (carray str-d))
- (reserve size-t)))
+(cond
+ ((eq (os-symbol) :macos)
+ (deffi-type glob-t (struct glob-t
+ (pathc size-t)
+ (nil int)
+ (nil size-t)
+ (nil int)
+ (pathv (carray str-d))
+ (nil (array 4 cptr)))))
+ (t (deffi-type glob-t (struct glob-t
+ (pathc size-t)
+ (pathv (carray str-d))
+ (reserve size-t)))))
(with-dyn-lib nil
(deffi globb "glob" int (str int closure (ptr-out glob-t)))