!7 p-exp { test1(); test2(); } svoid test1 { new BakedBot bot; bot.lists.setText("NL Logic Examples", [[ inputContainsTokens("=>") && !inputStartsWith("!rule ") => output(Should I store this rule?) ]]); setOpt(bot.bot, authorized := true); assertEqualsVerbose("Should I store this rule?", callAnswerMethod(bot, "bla => blubb")); assertEqualsVerbose("", unnull(callAnswerMethod(bot, "bla <= blubb"))); assertEqualsVerbose("Rule saved. Have 2 rules.", callAnswerMethod(bot, "!rule bla => bla")); } svoid test2 { BakedBot bot = bakedBotWithRules([[ input(what is $chicken $wire?) => output(a $wire made from $chicken) ]]); assertEqualsVerbose("a sausage made from pork", callAnswerMethod(bot, "what is pork sausage?")); }