mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Add tests for gears.string.startswith and endswith
Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
This commit is contained in:
parent
5d0e9fd9e3
commit
e7bf8de081
1 changed files with 14 additions and 0 deletions
|
@ -29,4 +29,18 @@ describe("gears.string", function()
|
|||
assert.is.equal(string.match("DownLow", gstring.query_to_pattern("ownl")), "ownL")
|
||||
end)
|
||||
end)
|
||||
|
||||
describe("startswith", function()
|
||||
assert.is_true(gstring.startswith("something", ""))
|
||||
assert.is_true(gstring.startswith("something", "some"))
|
||||
assert.is_false(gstring.startswith("something", "none"))
|
||||
end)
|
||||
|
||||
describe("endswith", function()
|
||||
assert.is_true(gstring.endswith("something", ""))
|
||||
assert.is_true(gstring.endswith("something", "thing"))
|
||||
assert.is_false(gstring.endswith("something", "that"))
|
||||
end)
|
||||
end)
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
Loading…
Reference in a new issue