Fixed some issues where pretty
would create new global variables.
This commit is contained in:
parent
965e99abcc
commit
72f1ba5dfd
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
local TABLE_TYPE
|
local TABLE_TYPE
|
||||||
do
|
do
|
||||||
local thispath = ... and select('1', ...):match('.+%.') or ''
|
local thispath, was_loaded = ... and select('1', ...):match('.+%.') or ''
|
||||||
was_loaded, TABLE_TYPE = pcall(require, thispath..'table_type')
|
was_loaded, TABLE_TYPE = pcall(require, thispath..'table_type')
|
||||||
assert(was_loaded, '[pretty]: Could not load vital library: table_type')
|
assert(was_loaded, '[pretty]: Could not load vital library: table_type')
|
||||||
end
|
end
|
||||||
|
|
|
@ -300,7 +300,7 @@ local TABLE_TYPE_TO_PAIR_FORMAT = {
|
||||||
|
|
||||||
-- Formatting tables
|
-- Formatting tables
|
||||||
|
|
||||||
function format_table (t, depth, l)
|
local function format_table (t, depth, l)
|
||||||
-- TODO: Add more nuanced formatting.
|
-- TODO: Add more nuanced formatting.
|
||||||
|
|
||||||
-- Error Checking
|
-- Error Checking
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
package.path = package.path .. ';./test/?.lua;./src/?.lua'
|
package.path = package.path .. ';./test/?.lua;./src/?.lua'
|
||||||
|
|
||||||
local TEST_SUITE = require("TestSuite").new('pretty')
|
local TEST_SUITE = require("TestSuite").new('pretty')
|
||||||
|
TEST_SUITE:enableStrictGlobal()
|
||||||
TEST_SUITE:addModules('test/test_*')
|
TEST_SUITE:addModules('test/test_*')
|
||||||
-- TEST_SUITE:generateRequireSubmodule 'require'
|
-- TEST_SUITE:generateRequireSubmodule 'require'
|
||||||
TEST_SUITE:setOptions(...)
|
TEST_SUITE:setOptions(...)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user