From b3de30f0cbfc9ae98ff173cd6222378871036373 Mon Sep 17 00:00:00 2001 From: VorTechnix <45538536+VorTechnix@users.noreply.github.com> Date: Thu, 21 Dec 2023 08:33:44 -0800 Subject: [PATCH] new HV test --- .tests/parse/axes/axes_parser.test.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.tests/parse/axes/axes_parser.test.lua b/.tests/parse/axes/axes_parser.test.lua index 51f8946d..7961b8f2 100644 --- a/.tests/parse/axes/axes_parser.test.lua +++ b/.tests/parse/axes/axes_parser.test.lua @@ -29,10 +29,20 @@ describe("parse_axes", function() assert.are.same(Vector3.new(10, 10, 10), maxv) 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() local minv, maxv = parse_axes({ "l", "3", -- +z - "-r", "-3", -- +z + "-right", "-3", -- +z "b", "-10", -- -x }, facing_dirs.x_pos) assert.is.truthy(minv) @@ -155,4 +165,4 @@ describe("parse_axes", function() assert.are.same("string", type(maxv)) end) -end) +end) \ No newline at end of file