Skip to content
Snippets Groups Projects
Commit 719f8c04 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/struct1: Add testcase for an unknown type char.

parent e53fb1bf
No related branches found
No related tags found
No related merge requests found
......@@ -62,6 +62,12 @@ try:
except TypeError:
print('TypeError')
# make sure that unknown types are detected
try:
struct.pack("z", 1)
except:
print("Unknown type")
# Initially repitition counters were supported only for strings,
# but later were implemented for all.
print(struct.unpack("<3B2h", b"foo\x12\x34\xff\xff"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment