From ba3b22b851d1b20fc918569a50e328ed7edf906d Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sun, 29 Mar 2020 01:15:39 +0100 Subject: [PATCH] Test suite: Test multiple "Modes" lines in [Channel] sections --- src/testsuite/join-test.e | 43 +++++++++++++++++++++++++++++++++ src/testsuite/ngircd-test1.conf | 6 +++++ 2 files changed, 49 insertions(+) diff --git a/src/testsuite/join-test.e b/src/testsuite/join-test.e index c088f5cc..643dde42 100644 --- a/src/testsuite/join-test.e +++ b/src/testsuite/join-test.e @@ -61,6 +61,49 @@ expect { timeout { exit 1 } "405" } +send "JOIN 0\r" + +send "JoIn #MultiMode\r" +expect { + timeout { exit 1 } + "474 nick #MultiMode" +} + +send "OPer TestOp 123\r" +expect { + timeout { exit 1 } + "381" +} + +send "Mode #MultiMode -b nick!~user\r" +expect { + timeout { exit 1 } + "MODE #MultiMode -b nick!~user@*" +} + +send "jOiN #MULTIMODE\r" +expect { + timeout { exit 1 } + "@* JOIN :#MULTIMODE" +} +expect { + timeout { exit 1 } + "366" +} +send "ModE #MULTImode\r" +expect { + timeout { exit 1 } + "324 nick #MultiMode +Pnt" +} +send "mODe #multimode +b\r" +expect { + timeout { exit 1 } + "367 nick #MultiMode banned!~ghost@example.com ngircd.test.server" +} +expect { + timeout { exit 1 } + "368 nick #MultiMode" +} send "quit\r" expect { diff --git a/src/testsuite/ngircd-test1.conf b/src/testsuite/ngircd-test1.conf index ab240a7c..233238aa 100644 --- a/src/testsuite/ngircd-test1.conf +++ b/src/testsuite/ngircd-test1.conf @@ -63,4 +63,10 @@ Name = +ModelessChannel Topic = A modeless Channel +[Channel] + Name = MultiMode + Modes = +n +b nick!~user + Modes = +t + Modes = +b banned!~ghost@example.com + # -eof-