roza/tests/acceptances/str.roza

14 lines
291 B
Plaintext
Raw Permalink Normal View History

2023-12-16 18:42:26 +00:00
# STRING OPERATIONS
# =================
# concatenation with +
assert "hel" + "lo" == "hello"
assert "hello" + " " + "world" == "hello world"
# duplication with *
assert "a" * 3 == "aaa"
assert 4 * "!" == "!!!!"
# bonus
assert ("a" * 2) + "b" == "aab"
assert 4 * ("a" + "b") == "abababab"