8000 Add basic string multiplication tests · RustPython/RustPython@d1730a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit d1730a5

Browse files
committed
Add basic string multiplication tests
1 parent f12268f commit d1730a5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/snippets/strings.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929

3030
assert str(["a", "b", "can't"]) == "['a', 'b', \"can't\"]"
3131

32+
assert "xy" * 3 == "xyxyxy"
33+
assert "x" * 0 == ""
34+
assert "x" * -1 == ""
35+
36+
assert 3 * "xy" == "xyxyxy"
37+
assert 0 * "x" == ""
38+
assert -1 * "x" == ""
39+
3240
a = 'Hallo'
3341
assert a.lower() == 'hallo'
3442
assert a.upper() == 'HALLO'

0 commit comments

Comments
 (0)
0