X-Git-Url: https://git.martlubbers.net/?p=cloogle-irc.git;a=blobdiff_plain;f=test.icl;h=f402f99f3770208ccf9110bba493a19680fe99d6;hp=fce029920c1999262e7912e2b14122fe568b229b;hb=d1b0f20fbd85d85cee19347e7deda5e3a9251906;hpb=aa96c27332a624f88b0031415374db8f5f6e71eb diff --git a/test.icl b/test.icl index fce0299..f402f99 100644 --- a/test.icl +++ b/test.icl @@ -1,17 +1,12 @@ module test -from Data.Func import $ -import Data.Either -import Data.Maybe -import StdEnv + +import gast import IRC -from Text import class Text(concat), instance Text String +derive ggen IRCMessage + +Start = Test [] pParsePrint -Start = concat $ map toString - [NICK "clooglebot" Nothing - ,USER "cloogle" "0" "cloogle" "Cloogle bot" - ,JOIN (CSepList ["#cloogle"]) Nothing - ,PRIVMSG (CSepList ["#cloogle"]) "Hello world" - ,QUIT Nothing - ] +pParsePrint :: IRCMessage -> Bool +pParsePrint a = toString (parseIRCMessage (toString a)) == toString a