Exemplo n.º 1
0
 def test_oneWord(self):
     """
     Splitting strings with one-word phrases.
     """
     s = 'This code "works."'
     r = text.splitQuoted(s)
     self.assertEqual(["This", "code", "works."], r)
Exemplo n.º 2
0
 def test_oneWord(self):
     """
     Splitting strings with one-word phrases.
     """
     s = 'This code "works."'
     r = text.splitQuoted(s)
     self.assertEqual(['This', 'code', 'works.'], r)
Exemplo n.º 3
0
    def dcc_CHAT(self, user, channel, data):
        data = text.splitQuoted(data)
        if len(data) < 3:
            raise IRCBadMessage("malformed DCC CHAT request: %r" % (data, ))

        (protocol, address, port) = data[:3]

        address = irc.dccParseAddress(address)
        try:
            port = int(port)
        except ValueError:
            raise irc.IRCBadMessage("Indecipherable port %r" % (port, ))

        self.dccDoChat(user, channel, protocol, address, port, data)
Exemplo n.º 4
0
    def dcc_CHAT(self, user, channel, data):
        data = text.splitQuoted(data)
        if len(data) < 3:
            raise IRCBadMessage("malformed DCC CHAT request: %r" % (data,))

        (protocol, address, port) = data[:3]

        address = irc.dccParseAddress(address)
        try:
            port = int(port)
        except ValueError:
            raise irc.IRCBadMessage("Indecipherable port %r" % (port,))

        self.dccDoChat(user, channel, protocol, address, port, data)
Exemplo n.º 5
0
 def test_multiWord(self):
     s = 'The "hairy monkey" likes pie.'
     r = text.splitQuoted(s)
     self.assertEqual(['The', 'hairy monkey', 'likes', 'pie.'], r)
Exemplo n.º 6
0
 def test_multiWord(self):
     s = 'The "hairy monkey" likes pie.'
     r = text.splitQuoted(s)
     self.assertEqual(["The", "hairy monkey", "likes", "pie."], r)
Exemplo n.º 7
0
 def test_multiWord(self):
     s = 'The "hairy monkey" likes pie.'
     r = text.splitQuoted(s)
     self.failUnlessEqual(['The', 'hairy monkey', 'likes', 'pie.'], r)
Exemplo n.º 8
0
 def test_multiWord(self):
     s = 'The "hairy monkey" likes pie.'
     r = text.splitQuoted(s)
     self.failUnlessEqual(["The", "hairy monkey", "likes", "pie."], r)
Exemplo n.º 9
0
 def test_oneWord(self):
     """Splitting strings with one-word phrases."""
     s = 'This code "works."'
     r = text.splitQuoted(s)
     self.failUnlessEqual(["This", "code", "works."], r)
Exemplo n.º 10
0
 def test_oneWord(self):
     """Splitting strings with one-word phrases."""
     s = 'This code "works."'
     r = text.splitQuoted(s)
     self.failUnlessEqual(['This', 'code', 'works.'], r)