Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tests for the parser.

  • Loading branch information...
commit af43da1d8aea18c9b75d076090b62a318e92300d 1 parent 901cc66
@Raynes authored
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"})))
Please sign in to comment.
Something went wrong with that request. Please try again.