mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Error when string.split is given empty separator (#13132)
This commit is contained in:
parent
a3177b89d8
commit
ab1fe80150
3 changed files with 10 additions and 1 deletions
|
@ -38,6 +38,12 @@ describe("string", function()
|
|||
assert.same({ "one", "two" }, string.split("one,two", ",", false, -1, true))
|
||||
assert.same({ "one", "two", "three" }, string.split("one2two3three", "%d", false, -1, true))
|
||||
end)
|
||||
|
||||
it("rejects empty separator", function()
|
||||
assert.has.errors(function()
|
||||
string.split("", "")
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue