mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Implement ale.pad in Lua
This commit is contained in:
13
test/lua/ale_pad_spec.lua
Normal file
13
test/lua/ale_pad_spec.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
local eq = assert.are.same
|
||||
local ale = require("ale")
|
||||
|
||||
describe("ale.pad", function()
|
||||
it("should pad non-empty strings", function()
|
||||
eq(" foo", ale.pad("foo"))
|
||||
end)
|
||||
|
||||
it("should return empty strings for nil or empty strings", function()
|
||||
eq("", ale.pad(nil))
|
||||
eq("", ale.pad(""))
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user