From 1173ff0c13a07dec2ede3166378dc5f50fff37b3 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 18 Jan 2020 02:09:18 +0000 Subject: Add Lua unit tests to builtin using busted (#9184) --- builtin/common/misc_helpers.lua | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'builtin/common/misc_helpers.lua') diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua index 199f13cd1..e4c7f4aa3 100644 --- a/builtin/common/misc_helpers.lua +++ b/builtin/common/misc_helpers.lua @@ -200,9 +200,6 @@ function table.indexof(list, val) return -1 end -assert(table.indexof({"foo", "bar"}, "foo") == 1) -assert(table.indexof({"foo", "bar"}, "baz") == -1) - -------------------------------------------------------------------------------- if INIT ~= "client" then function file_exists(filename) @@ -220,8 +217,6 @@ function string:trim() return (self:gsub("^%s*(.-)%s*$", "%1")) end -assert(string.trim("\n \t\tfoo bar\t ") == "foo bar") - -------------------------------------------------------------------------------- function math.hypot(x, y) local t @@ -520,9 +515,6 @@ function core.string_to_pos(value) return nil end -assert(core.string_to_pos("10.0, 5, -2").x == 10) -assert(core.string_to_pos("( 10.0, 5, -2)").z == -2) -assert(core.string_to_pos("asd, 5, -2)") == nil) -------------------------------------------------------------------------------- function core.string_to_area(value) @@ -764,6 +756,3 @@ function core.privs_to_string(privs, delim) end return table.concat(list, delim) end - -assert(core.string_to_privs("a,b").b == true) -assert(core.privs_to_string({a=true,b=true}) == "a,b") -- cgit v1.2.3