]> gitweb.factorcode.org Git - factor.git/commitdiff
unix.ffi: Use a utility word for getting the aliases back.
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 22 Apr 2014 07:29:49 +0000 (00:29 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 22 Apr 2014 07:29:49 +0000 (00:29 -0700)
basis/unix/ffi/ffi-tests.factor

index 88164aed6c223dd140e0a869c2164303af543c42..16530eeae55eb9f4f423473d91480d3a6464160f 100644 (file)
@@ -1,10 +1,12 @@
+USING: accessors alien.c-types io.encodings.utf8 kernel
+sequences tools.test unix.ffi unix.utilities ;
 IN: unix.ffi.tests
-USING: accessors alien.c-types tools.test unix.ffi ;
 
 [ 80 ] [ "http" f getservbyname port>> ntohs ] unit-test
 
-[ "www" ] [
-    0 "http" f getservbyname aliases>> c-string alien-element
+[ t ] [
+    0 "http" f getservbyname aliases>> utf8 alien>strings
+    "www" swap member?
 ] unit-test
 
 [ "http" ] [ 80 htons f getservbyport name>> ] unit-test