Skip to content

Commit d6188dc

Browse files
Update run-strings.test
1 parent cac1e52 commit d6188dc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mypyc/test-data/run-strings.test

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,3 +815,15 @@ def test_unicode_range() -> None:
815815
assert "\u2029 \U0010AAAA\U00104444B\u205F ".strip() == "\U0010AAAA\U00104444B"
816816
assert " \u3000\u205F ".strip() == ""
817817
assert "\u2029 \U00102865\u205F ".rstrip() == "\u2029 \U00102865"
818+
819+
[case testCount]
820+
def test_count() -> None:
821+
string = "abcbcb"
822+
assert string.count("a") == 1
823+
assert string.count("b") == 3
824+
assert string.count("c") == 2
825+
def test_count_start_end() -> None:
826+
string = "abcbcb"
827+
assert string.count("a", 0, 4) == 1
828+
assert string.count("b", 0, 4) == 2
829+
assert string.count("c", 0, 4) == 1

0 commit comments

Comments
 (0)