summaryrefslogtreecommitdiff
path: root/Data/Libraries/Penlight/spec/text_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Data/Libraries/Penlight/spec/text_spec.lua')
-rw-r--r--Data/Libraries/Penlight/spec/text_spec.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/Data/Libraries/Penlight/spec/text_spec.lua b/Data/Libraries/Penlight/spec/text_spec.lua
new file mode 100644
index 0000000..cd42f06
--- /dev/null
+++ b/Data/Libraries/Penlight/spec/text_spec.lua
@@ -0,0 +1,11 @@
+local text = require("pl.text")
+
+describe("pl.text.Template", function ()
+
+ it("replaces placeholders", function ()
+ local tempalte = text.Template("${here} is the $answer")
+ local out = tempalte:substitute({ here = 'one', answer = 'two' })
+ assert.is.equal('one is the two', out)
+ end)
+
+end)