]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/base64/base64-tests.factor
base64: adding urlsafe base64 and specify RFC 3548.
[factor.git] / basis / base64 / base64-tests.factor
index a63f6b3bc63e900f065e309775536b5dfb2d3159..e3ab35d250bdd69988135ee01a03c6a0e48a5480 100644 (file)
@@ -39,3 +39,9 @@ sequences splitting strings tools.test ;
     "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKb2UifQ.ipevRNuRP6HflG8cFKnmUPtypruRC4fb1DWtoLL62SY"
     "." split [ base64> ] map
 ] unit-test
+
+{ "01a+b/cd" } [ "\xd3V\xbeo\xf7\x1d" >base64 "" like ] unit-test
+{ "\xd3V\xbeo\xf7\x1d" } [ "01a+b/cd" base64> "" like ] unit-test
+
+{ "01a-b_cd" } [ "\xd3V\xbeo\xf7\x1d" >urlsafe-base64 "" like ] unit-test
+{ "\xd3V\xbeo\xf7\x1d" } [ "01a-b_cd" urlsafe-base64> "" like ] unit-test