svoid testAttractorBotResponse(AttractorBot bot, S input, S expectedOutput, O... _) { bool fail = !boolPar noFail(_); new LS out; temp tempSet(bot, say := vfAddToCollection(out)); bot.addInput(input); if (empty(expectedOutput)) { if (!empty(out)) ret with failOrWarn(fail, "Bot returned unexpected output: " + multiLineQuote(lines_rtrim(out))); } else { if (!cic(out, expectedOutput)) ret with failOrWarn(fail, "Bot didn't return " + multiLineQuote(expectedOutput) + ", instead said: " + multiLineQuote(lines_rtrim(out))); print("OK, bot said: " + first(out)); LS rest = listWithoutIC(out, expectedOutput); if (nempty(rest)) ret with failOrWarn(fail, "Bot returned additional lines: " + rest); } }