diff options
author | Kim Alvefur <zash@zash.se> | 2017-11-10 05:46:39 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-11-10 05:46:39 +0100 |
commit | 0c4ad0fdbccf8552e463aa51b24030c9f01bf365 (patch) | |
tree | 39901441d959c8344eb5ace3794fbacc15ea962a /spec | |
parent | 1438a3884507b709cba08691d329b0cf137f4bd4 (diff) | |
download | prosody-0c4ad0fdbccf8552e463aa51b24030c9f01bf365.tar.gz prosody-0c4ad0fdbccf8552e463aa51b24030c9f01bf365.zip |
util.format: Move tests to spec/
Diffstat (limited to 'spec')
-rw-r--r-- | spec/util_format_spec.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/util_format_spec.lua b/spec/util_format_spec.lua new file mode 100644 index 00000000..19a8af99 --- /dev/null +++ b/spec/util_format_spec.lua @@ -0,0 +1,13 @@ +local format = require "util.format".format; + +describe("util.format", function() + describe("#format()", function() + it("should work", function() + assert.equal(format("%s", "hello"), "hello"); + assert.equal(format("%s"), "<nil>"); + assert.equal(format("%s", true), "true"); + assert.equal(format("%d", true), "[true]"); + assert.equal(format("%%", true), "% [true]"); + end); + end); +end); |