X-Git-Url: https://git.martlubbers.net/?p=cloogle-irc.git;a=blobdiff_plain;f=test.icl;h=f402f99f3770208ccf9110bba493a19680fe99d6;hp=5ffe81899678f2cef756d31c84f27a83ea6df560;hb=d1b0f20fbd85d85cee19347e7deda5e3a9251906;hpb=663ea3d6dfb6a70ddf1f3b6c41d4d39ed30c4440 diff --git a/test.icl b/test.icl index 5ffe818..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" Nothing - ,USER "cloogle" "0" "Cloogle bot" - ,JOIN [("#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