 USING: kernel tools.test accessors arrays sequences qualified
-       io.streams.string io.streams.duplex namespaces
-       irc.client.private ;
+       io.streams.string io.streams.duplex namespaces threads
+       calendar irc.client.private ;
 EXCLUDE: irc.client => join ;
 IN: irc.client.tests
 

[ ":someuser!n=user@some.where PRIVMSG #factortest :hi"
  parse-irc-line f >>timestamp ] unit-test

{ "" } make-client dup nick>> "factorbot" >>name drop current-irc-client [
    { t } [ irc-client> nick>> name>> me? ] unit-test

    { "factorbot" } [ irc-client> nick>> name>> ] unit-test

: make-client ( lines -- irc-client )
   "someserver" irc-port "factorbot" f <irc-profile> <irc-client>
   swap [ 2nip <test-stream> f ] curry >>connect ;

: set-nick ( irc-client nickname -- )
     [ nick>> ] dip >>name drop ;

: with-dummy-client ( quot -- )
     rot with-variable ; inline
