]> gitweb.factorcode.org Git - factor.git/commitdiff
Put brackets around ipv6 addresses in `inet6 present`
authorAlex Maestas <git@se30.xyz>
Wed, 24 Aug 2022 01:56:36 +0000 (01:56 +0000)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 24 Aug 2022 02:00:50 +0000 (19:00 -0700)
basis/io/sockets/sockets-tests.factor
basis/io/sockets/sockets.factor

index 3b98bed9eac12e8a71143b94d3535f6dda6ed134..2cd28301810f33fc525de95c429701fc0be895c8 100644 (file)
@@ -37,8 +37,8 @@ os unix? [
 
 ! Test present on addrspecs
 { "4.4.4.4:12" } [ "4.4.4.4" 12 <inet4> present ] unit-test
-{ "::1:12" } [ "::1" 12 <inet6> present ] unit-test
-{ "fe80::1%1:12" } [ "fe80::1" 1 12 inet6 boa present ] unit-test
+{ "[::1]:12" } [ "::1" 12 <inet6> present ] unit-test
+{ "[fe80::1%1]:12" } [ "fe80::1" 1 12 inet6 boa present ] unit-test
 
 { B{ 1 2 3 4 } }
 [ "1.2.3.4" T{ inet4 } inet-pton ] unit-test
index 8c40b0d980c1914d855c04869d5d46bb77044553..9ffa6231ca496d3d20bc705c65cb6e7b2e651a5c 100644 (file)
@@ -214,7 +214,7 @@ M: inet6 parse-sockaddr
     [ call-next-method ] [ drop port>> ntohs ] 2bi with-port ;
 
 M: inet6 present
-    [ call-next-method ] [ port>> number>string ] bi ":" glue ;
+    [ call-next-method "[" "]" surround ] [ port>> number>string ] bi ":" glue ;
 
 M: inet6 protocol drop 0 ;