diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-10-31 18:43:55 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-10-31 18:55:31 +0300 |
commit | 0bd3f3291d3ea0252a91653a1edcbfa83d524834 (patch) | |
tree | 2a53c4ece8e254ffd5fa7f80a2c4d6bef6c86992 | |
parent | 2b080cf599c3734a66b719fc6d0b59ea9fe15caf (diff) |
tests/base/struct1.py: Add test for repetition counters.
-rw-r--r-- | tests/basics/struct1.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/basics/struct1.py b/tests/basics/struct1.py index 1a32c482c..61c08b74e 100644 --- a/tests/basics/struct1.py +++ b/tests/basics/struct1.py @@ -61,3 +61,8 @@ try: struct.pack(1, 2) except TypeError: print('TypeError') + +# Initially repitition counters were supported only for strings, +# but later were implemented for all. +print(struct.unpack("<3B2h", b"foo\x12\x34\xff\xff")) +print(struct.pack("<3B", 1, 2, 3)) |