mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-23 07:43:01 +00:00
24 lines
1.4 KiB
Lua
24 lines
1.4 KiB
Lua
local parse_seed = require("worldeditadditions_core.utils.parse.seed")
|
|
|
|
describe("parse.seed", function()
|
|
it("should work", function()
|
|
local source = "a test string"
|
|
|
|
local result = parse_seed(source)
|
|
|
|
assert.are.equal(
|
|
"number",
|
|
type(result)
|
|
)
|
|
end)
|
|
it("should work with a long string", function()
|
|
local source = "If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction. If it looks like a duck and quacks like a duck but it needs batteries, you probably have the wrong abstraction."
|
|
|
|
local result = parse_seed(source)
|
|
|
|
assert.are.equal(
|
|
"number",
|
|
type(result)
|
|
)
|
|
end)
|
|
end)
|