public void DecodeMessage_RfcExample2() { // from the CTCP RFC: http://www.irchelp.org/irchelp/rfc/ctcpspec.html string text = "SED " + '\x10' + "n\t\big" + '\x10' + '\x10' + @"\a" + '\x10' + @"0\\:"; string expected = "SED \n\t\big" + '\x10' + '\x1' + '\0' + @"\:"; Assert.AreEqual(expected, CtcpUtils.DecodeMessage(text)); }
public void DecodeMessage_RfcExample1() { // from the CTCP RFC: http://www.irchelp.org/irchelp/rfc/ctcpspec.html string text = "Hi there!" + '\x10' + "nHow are you? " + @"\\K?"; string expected = "Hi there!\nHow are you? " + @"\K?"; Assert.AreEqual(expected, CtcpUtils.DecodeMessage(text)); }