[tor-commits] [flashproxy/master] Add a test of a long message with an odd number of bytes.

dcf at torproject.org dcf at torproject.org
Mon Apr 9 04:08:43 UTC 2012


commit 5e6fdd100f23926050964c6f9885d5f4a53b3b42
Author: David Fifield <david at bamsoftware.com>
Date:   Sat Apr 7 04:59:08 2012 -0700

    Add a test of a long message with an odd number of bytes.
---
 connector-test.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/connector-test.py b/connector-test.py
index a15c1ad..36c9208 100755
--- a/connector-test.py
+++ b/connector-test.py
@@ -47,6 +47,9 @@ class TestWebSocketDecoder(unittest.TestCase):
             ("\x82\x7f\x00\x00\x00\x00\x00\x01\x00\x00" + "\x00" * 65536, False,
                 [(True, 2, "\x00" * 65536)],
                 [(2, "\x00" * 65536)]),
+            ("\x82\x7f\x00\x00\x00\x00\x00\x01\x00\x03" + "ABCD" * 16384 + "XYZ", False,
+                [(True, 2, "ABCD" * 16384 + "XYZ")],
+                [(2, "ABCD" * 16384 + "XYZ")]),
         ]
         for data, use_mask, expected_frames, expected_messages in TESTS:
             dec = WebSocketDecoder(use_mask = use_mask)





More information about the tor-commits mailing list