summaryrefslogtreecommitdiffstats
path: root/tests/017
diff options
context:
space:
mode:
Diffstat (limited to 'tests/017')
-rw-r--r--tests/017/str-s.tl11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/017/str-s.tl b/tests/017/str-s.tl
new file mode 100644
index 00000000..bb9dc38a
--- /dev/null
+++ b/tests/017/str-s.tl
@@ -0,0 +1,11 @@
+(load "../common")
+
+(with-dyn-lib nil
+ (deffi strtol "strtol" long (str (ptr-out (array 1 str-s)) int))
+ (deffi bcstol "strtol" long (bstr (ptr-out (array 1 bstr-s)) int))
+ (deffi wcstol "wcstol" long (wstr (ptr-out (array 1 wstr-s)) int)))
+
+(mtest
+ (let ((v (vec nil))) (list (strtol "-345x" v 0) v)) (-345 #("x"))
+ (let ((v (vec nil))) (list (bcstol "-345x" v 0) v)) (-345 #("x"))
+ (let ((v (vec nil))) (list (wcstol "-345x" v 0) v)) (-345 #("x")))