Skip to content

Commit

Permalink
Assert that string interpolation works with expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Jul 19, 2023
1 parent 7e52308 commit b7b0eda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/basic.pluto
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down

0 comments on commit b7b0eda

Please sign in to comment.