[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/js] Add a test of a long message with an odd number of bytes.
commit 5e6fdd100f23926050964c6f9885d5f4a53b3b42
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits