From b7b0eda441af7299f8e78147fea5cdbb6a6f69f3 Mon Sep 17 00:00:00 2001 From: Sainan Date: Wed, 19 Jul 2023 19:36:13 +0200 Subject: [PATCH] Assert that string interpolation works with expressions --- tests/basic.pluto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/basic.pluto b/tests/basic.pluto index ca0a83abe8..1e92be6f28 100644 --- a/tests/basic.pluto +++ b/tests/basic.pluto @@ -893,6 +893,10 @@ do local f_string_local = "bar" assert($"a{f_string_global}b{f_string_local}c" == "afoobbarc") assert($"{f_string_global}{f_string_local}" == "foobar") + + local label = "meaning of life" + local data = { value = 42 } + assert($"The {label} is {data.value}" == "The meaning of life is 42") end do local t = { a = "hello" }