]> gitweb.factorcode.org Git - factor.git/commitdiff
io.sockets: fix unit test on Windows
authorSlava Pestov <slava@shill.local>
Sun, 27 Feb 2011 21:55:54 +0000 (13:55 -0800)
committerSlava Pestov <slava@shill.local>
Sun, 27 Feb 2011 22:38:47 +0000 (14:38 -0800)
basis/io/sockets/sockets-tests.factor
basis/io/sockets/sockets.factor

index 0c79323a246929c10dfa058c1cb464fb2b219ffe..7e57f87a9ea6568870ae1c41f2903d9b293b3bdd 100644 (file)
@@ -1,10 +1,13 @@
 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
 
index b567721e3f0e9f2bd1c8c88d260e7cacbef2b6ee..0865500f76f02da25a22c80c14c049e01ffa3645 100644 (file)
@@ -1,10 +1,10 @@
-! 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
@@ -55,10 +55,10 @@ HOOK: addrspec-of-family os ( af -- addrspec )
 
 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 ;