From 8a9f48a3c7c4e1759a38df14206bdd7638884287 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 8 Mar 2023 22:05:42 +0200 Subject: [PATCH] Unit tests - Don't use `command()` directly for joining channels but rather `joinChannel(string)` - Added a test for multiple channel sending --- source/birchwood/client/core.d | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/birchwood/client/core.d b/source/birchwood/client/core.d index a9ad970..01ed1cf 100644 --- a/source/birchwood/client/core.d +++ b/source/birchwood/client/core.d @@ -1188,7 +1188,10 @@ public class Client : Thread client.command(new Message("", "USER", "doggie doggie irc.frdeenode.net :Tristan B. Kildaire")); Thread.sleep(dur!("seconds")(4)); - client.command(new Message("", "JOIN", "#birchwood")); + // client.command(new Message("", "JOIN", "#birchwood")); + client.joinChannel("#birchwood"); + // TODO: Add a joinChannels(string[]) + client.joinChannel("#birchwood2"); Thread.sleep(dur!("seconds")(2)); client.command(new Message("", "NAMES", "")); @@ -1205,6 +1208,11 @@ public class Client : Thread */ client.channelMessage("This is a test message sent to a channel", ["#birchwood"]); + /** + * Test sending a message to multiple channels + */ + client.channelMessage("This is a message sent to multiple channels one-shot", ["#birchwood", "#birchwood2"]); + /* TODO: Add a check here to make sure the above worked I guess? */ /* TODO: Make this end */ // while(true)