aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mason-core/installer/compiler/expr_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/mason-core/installer/compiler/expr_spec.lua b/tests/mason-core/installer/compiler/expr_spec.lua
index 944a5983..4f96c04f 100644
--- a/tests/mason-core/installer/compiler/expr_spec.lua
+++ b/tests/mason-core/installer/compiler/expr_spec.lua
@@ -270,4 +270,17 @@ describe("table interpolation", function()
}, {})
)
end)
+
+ it("should interpolate string keys", function()
+ assert.same(
+ Result.success {
+ ["a-1.2.3"] = "1.2.3",
+ [12] = "12",
+ },
+ expr.tbl_interpolate({
+ ["a-{{version}}"] = "{{version}}",
+ [12] = "12",
+ }, { version = "1.2.3" })
+ )
+ end)
end)