diff --git a/basis/io/sockets/sockets-tests.factor b/basis/io/sockets/sockets-tests.factor index 4b95a31512..dc0c698699 100644 --- a/basis/io/sockets/sockets-tests.factor +++ b/basis/io/sockets/sockets-tests.factor @@ -33,6 +33,9 @@ concurrency.promises threads io.streams.string ; [ B{ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } ] [ "::1" T{ inet6 } inet-pton ] unit-test +[ B{ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 } ] +[ "::100" T{ inet6 } inet-pton ] unit-test + [ B{ 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 2 } ] [ "1::2" T{ inet6 } inet-pton ] unit-test @@ -45,6 +48,9 @@ concurrency.promises threads io.streams.string ; [ "1:2:0:0:0:0:3:4" ] [ B{ 0 1 0 2 0 0 0 0 0 0 0 0 0 3 0 4 } T{ inet6 } inet-ntop ] unit-test +[ "2001:6f8:37a:5:0:0:0:1" ] +[ "2001:6f8:37a:5::1" T{ inet6 } [ inet-pton ] [ inet-ntop ] bi ] unit-test + [ t ] [ "localhost" 80 resolve-host length 1 >= ] unit-test ! Smoke-test UDP diff --git a/basis/io/sockets/sockets.factor b/basis/io/sockets/sockets.factor index 0ef485b74c..8dce527553 100644 --- a/basis/io/sockets/sockets.factor +++ b/basis/io/sockets/sockets.factor @@ -109,7 +109,7 @@ M: invalid-inet6 summary drop "Invalid IPv6 address" ; [ f ] [ ":" split [ hex> [ "Component not a number" throw ] unless* - ] B{ } map-as + ] { } map-as ] if-empty ; : pad-inet6 ( string1 string2 -- seq )