]> gitweb.factorcode.org Git - factor.git/commitdiff
urls.tests: unit tests for url-addr
authorBjörn Lindqvist <bjourne@gmail.com>
Mon, 9 Sep 2013 14:05:17 +0000 (16:05 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 14 Apr 2014 15:42:08 +0000 (08:42 -0700)
basis/urls/urls-tests.factor

index e196161e9b2dad82119f115c1d4423c18d55b62d..f66f40b1cf897a9f234021465c9e5827ea8ea703 100644 (file)
@@ -1,5 +1,5 @@
 IN: urls.tests
-USING: urls urls.private tools.test prettyprint
+USING: io.sockets io.sockets.secure urls urls.private tools.test prettyprint
 arrays kernel assocs present accessors ;
 
 CONSTANT: urls
@@ -265,3 +265,13 @@ urls [
 [ "/" ] [ "http://www.jedit.org" >url path>> ] unit-test
 
 [ "USING: urls ;\nURL\" foo\"" ] [ URL" foo" unparse-use ] unit-test
+
+[ T{ inet { host "google.com" } { port 80 } } ]
+[ URL" http://google.com/" url-addr ] unit-test
+
+[
+    T{ secure
+       { addrspec T{ inet { host "google.com" } { port 443 } } }
+    }
+]
+[ URL" https://google.com/" url-addr ] unit-test