From 6af90b29725a85f275380d1973b1454e25e6bdbc Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 25 Jul 2016 14:43:04 +0300 Subject: py/objstrunicode: str_index_to_ptr: Should handle bytes too. There's single str_index_to_ptr() function, called for both bytes and unicode objects, so should handle each properly. --- tests/basics/bytes_find.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/basics/bytes_find.py') diff --git a/tests/basics/bytes_find.py b/tests/basics/bytes_find.py index 434669a901..75ef9796cd 100644 --- a/tests/basics/bytes_find.py +++ b/tests/basics/bytes_find.py @@ -21,3 +21,6 @@ print(b"0000".find(b'-1', 3)) print(b"0000".find(b'1', 3)) print(b"0000".find(b'1', 4)) print(b"0000".find(b'1', 5)) + +# Non-ascii values (make sure not treated as unicode-like) +print(b"\x80abc".find(b"a", 1)) -- cgit v1.2.3