Skip to content
Browse files

Tests for the parser.

  • Loading branch information...
1 parent 901cc66 commit af43da1d8aea18c9b75d076090b62a318e92300d @Raynes committed Nov 21, 2011
Showing with 19 additions and 0 deletions.
  1. +19 −0 test/irclj/parser_test.clj
View
19 test/irclj/parser_test.clj
@@ -0,0 +1,19 @@
+(ns irclj.parser-test
+ (:use irclj.parser
+ clojure.test))
+
+(deftest parser-test
+ (is (= (parse-message ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure")
+ {:command "PRIVMSG",
+ :params ["#4clojure"],
+ :raw ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure",
+ :host "li231-96.members.linode.com",
+ :user "~amalloy",
+ :nick "amalloy"}))
+ (is (= (parse-message ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure :ckirkendall: would you mind using amalloy on irc, rather than alan? it's nice to get notifications from my irc client")
+ {:command "PRIVMSG",
+ :params ["#4clojure" "ckirkendall: would you mind using amalloy on irc, rather than alan? it's nice to get notifications from my irc client"],
+ :raw ":amalloy!~amalloy@li231-96.members.linode.com PRIVMSG #4clojure :ckirkendall: would you mind using amalloy on irc, rather than alan? it's nice to get notifications from my irc client",
+ :host "li231-96.members.linode.com",
+ :user "~amalloy",
+ :nick "amalloy"})))

0 comments on commit af43da1

Please sign in to comment.
Something went wrong with that request. Please try again.