mirror of
https://github.com/deavmi/birchwood
synced 2024-09-20 02:03:27 +02:00
Client
- Fixed bug whereby the leaving of multiple channels broke after the first channel in `leaveChannel(string[])` Unit tests - Test leaving multiple channels, a single channel (singular) and a single channel (multi)
This commit is contained in:
parent
7a9bc642ea
commit
802fd9823d
@ -325,6 +325,9 @@ public class Client : Thread
|
|||||||
{
|
{
|
||||||
//TODO: Add check for #
|
//TODO: Add check for #
|
||||||
|
|
||||||
|
/* Append on a trailing `,` */
|
||||||
|
channelLine ~= ",";
|
||||||
|
|
||||||
for(ulong i = 1; i < channels.length; i++)
|
for(ulong i = 1; i < channels.length; i++)
|
||||||
{
|
{
|
||||||
string currentChannel = channels[i];
|
string currentChannel = channels[i];
|
||||||
@ -1184,6 +1187,9 @@ public class Client : Thread
|
|||||||
client.joinChannel("#birchwood");
|
client.joinChannel("#birchwood");
|
||||||
// TODO: Add a joinChannels(string[])
|
// TODO: Add a joinChannels(string[])
|
||||||
client.joinChannel("#birchwood2");
|
client.joinChannel("#birchwood2");
|
||||||
|
client.joinChannel("#birchwoodLeave1");
|
||||||
|
client.joinChannel("#birchwoodLeave2");
|
||||||
|
client.joinChannel("#birchwoodLeave3");
|
||||||
|
|
||||||
Thread.sleep(dur!("seconds")(2));
|
Thread.sleep(dur!("seconds")(2));
|
||||||
client.command(new Message("", "NAMES", ""));
|
client.command(new Message("", "NAMES", ""));
|
||||||
@ -1222,6 +1228,23 @@ public class Client : Thread
|
|||||||
*/
|
*/
|
||||||
client.directMessage("Message to myself", "birchwood");
|
client.directMessage("Message to myself", "birchwood");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test leaving multiple channels (multi)
|
||||||
|
*/
|
||||||
|
Thread.sleep(dur!("seconds")(2));
|
||||||
|
client.leaveChannel(["#birchwood", "#birchwood2"]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test leaving a single channel (singular)
|
||||||
|
*/
|
||||||
|
client.leaveChannel("#birchwoodLeave1");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test leaving a single channel (multi)
|
||||||
|
*/
|
||||||
|
client.leaveChannel(["#birchwoodLeave2"]);
|
||||||
|
|
||||||
// TODO: Don't forget to re-enable this when done testing!
|
// TODO: Don't forget to re-enable this when done testing!
|
||||||
Thread.sleep(dur!("seconds")(15));
|
Thread.sleep(dur!("seconds")(15));
|
||||||
client.quit();
|
client.quit();
|
||||||
|
Loading…
Reference in New Issue
Block a user