diff --git a/tests/io/write_ext.py b/tests/io/write_ext.py new file mode 100644 index 0000000000..f4ed0d3685 --- /dev/null +++ b/tests/io/write_ext.py @@ -0,0 +1,25 @@ +import uio + +try: + uio.BytesIO +except AttributeError: + import sys + print('SKIP') + sys.exit() + +buf = uio.BytesIO() + +buf.write(b"foo", 2) +print(buf.getvalue()) + +buf.write(b"foo", 100) +print(buf.getvalue()) + +buf.write(b"foobar", 1, 3) +print(buf.getvalue()) + +buf.write(b"foobar", 1, 100) +print(buf.getvalue()) + +buf.write(b"foobar", 100, 100) +print(buf.getvalue()) diff --git a/tests/io/write_ext.py.exp b/tests/io/write_ext.py.exp new file mode 100644 index 0000000000..0f9c6bfbc1 --- /dev/null +++ b/tests/io/write_ext.py.exp @@ -0,0 +1,5 @@ +b'fo' +b'fofoo' +b'fofoooob' +b'fofooooboobar' +b'fofooooboobar'