USING: io.sockets io.sockets.private sequences math tools.test
namespaces accessors kernel destructors calendar io.timeouts
io.encodings.utf8 io concurrency.promises threads
-io.streams.string present ;
+io.streams.string present system ;
IN: io.sockets.tests
-[ T{ local f "/tmp/foo" } ] [ "/tmp/foo" <local> ] unit-test
+os unix? [
+ [ T{ local f "/tmp/foo" } ] [ "/tmp/foo" <local> ] unit-test
+] when
+
[ T{ inet4 f f 0 } ] [ f 0 <inet4> ] unit-test
[ T{ inet6 f f 0 1 } ] [ f 1 <inet6> ] unit-test
-! Copyright (C) 2007, 2010 Slava Pestov, Doug Coleman,
+! Copyright (C) 2007, 2011 Slava Pestov, Doug Coleman,
! Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types alien.data alien.strings arrays
assocs byte-arrays classes classes.struct combinators
combinators.short-circuit continuations destructors fry generic
-grouping init io.backend io.binary io.encodings
+grouping init io.backend io.pathnames io.binary io.encodings
io.encodings.ascii io.encodings.binary io.ports
io.streams.duplex kernel math math.parser memoize namespaces
parser present sequences splitting strings summary system
PRIVATE>
-TUPLE: local { path read-only } ;
+TUPLE: local { path string read-only } ;
: <local> ( path -- addrspec )
- normalize-path local boa ;
+ absolute-path local boa ;
M: local present path>> "Unix domain socket: " prepend ;