diff options
author | xbe <xbe@machine> | 2014-03-12 22:57:16 -0700 |
---|---|---|
committer | xbe <xbe@machine> | 2014-03-12 22:57:16 -0700 |
commit | 9e1e8cd6428e875eb29be98124ee3b1ba2bace30 (patch) | |
tree | be21ee15a324d83b28851395182d925d091b12ef /tests/basics/string_find.py | |
parent | 19438fd30a3184b656221a59062ea32453d0fd16 (diff) |
Implement str.count and add tests for it.
Also modify mp_get_index to accept:
1. Indices that are or evaluate to a boolean.
2. Slice indices.
Add tests for these two cases.
Diffstat (limited to 'tests/basics/string_find.py')
-rw-r--r-- | tests/basics/string_find.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basics/string_find.py b/tests/basics/string_find.py index 90063228f..df65fd6e5 100644 --- a/tests/basics/string_find.py +++ b/tests/basics/string_find.py @@ -9,3 +9,15 @@ print("hello world".find("ll", 1, 2)) print("hello world".find("ll", 1, 3)) print("hello world".find("ll", 1, 4)) print("hello world".find("ll", 1, 5)) +print("hello world".find("ll", -100)) +print("0000".find('0')) +print("0000".find('0', 0)) +print("0000".find('0', 1)) +print("0000".find('0', 2)) +print("0000".find('0', 3)) +print("0000".find('0', 4)) +print("0000".find('0', 5)) +print("0000".find('-1', 3)) +print("0000".find('1', 3)) +print("0000".find('1', 4)) +print("0000".find('1', 5)) |