diff --git a/integration_tests/run_tests.py b/integration_tests/run_tests.py index e563d92434..8f3eb215f6 100755 --- a/integration_tests/run_tests.py +++ b/integration_tests/run_tests.py @@ -12,6 +12,7 @@ "expr_04.py", "expr_05.py", "test_str_01.py", + "test_str_02.py", "modules_01.py", #"modules_02.py", "test_math.py", diff --git a/integration_tests/test_str_02.py b/integration_tests/test_str_02.py new file mode 100644 index 0000000000..596ca1ac9f --- /dev/null +++ b/integration_tests/test_str_02.py @@ -0,0 +1,20 @@ +def f(): + x: str + x = "abcdefghijkl" + x = x + "123" + assert x == "abcdefghijkl123" + g(x) + y: str + y = h(x) + print(y) + assert y == "abcdefghijkl123|x" + +def g(x: str): + print(x) + assert x == "abcdefghijkl123" + +def h(x: str) -> str: + return x + "|x" + + +f()