mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 01:13:00 +00:00
new HV test
This commit is contained in:
parent
855a0fdfef
commit
b3de30f0cb
1 changed files with 12 additions and 2 deletions
|
@ -29,10 +29,20 @@ describe("parse_axes", function()
|
||||||
assert.are.same(Vector3.new(10, 10, 10), maxv)
|
assert.are.same(Vector3.new(10, 10, 10), maxv)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it("should work for h and v", function()
|
||||||
|
local minv, maxv = parse_axes({
|
||||||
|
"h", "3",
|
||||||
|
"-v", "4",
|
||||||
|
}, facing_dirs.x_pos)
|
||||||
|
assert.is.truthy(minv)
|
||||||
|
assert.are.same(Vector3.new(-3, -4, -3), minv)
|
||||||
|
assert.are.same(Vector3.new(3, 4, 3), maxv)
|
||||||
|
end)
|
||||||
|
|
||||||
it("should work on directions and their abriviations", function()
|
it("should work on directions and their abriviations", function()
|
||||||
local minv, maxv = parse_axes({
|
local minv, maxv = parse_axes({
|
||||||
"l", "3", -- +z
|
"l", "3", -- +z
|
||||||
"-r", "-3", -- +z
|
"-right", "-3", -- +z
|
||||||
"b", "-10", -- -x
|
"b", "-10", -- -x
|
||||||
}, facing_dirs.x_pos)
|
}, facing_dirs.x_pos)
|
||||||
assert.is.truthy(minv)
|
assert.is.truthy(minv)
|
||||||
|
|
Loading…
Reference in a new issue