Skip to content

Commit

Permalink
Tests for the parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynes committed Nov 22, 2011
1 parent 901cc66 commit af43da1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions 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.