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