1
0

Fixed some issues where pretty would create new global variables.

This commit is contained in:
Jon Michael Aanes 2017-06-16 17:04:14 +02:00
parent 965e99abcc
commit 72f1ba5dfd
3 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
local TABLE_TYPE
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')
assert(was_loaded, '[pretty]: Could not load vital library: table_type')
end

View File

@ -300,7 +300,7 @@ local TABLE_TYPE_TO_PAIR_FORMAT = {
-- Formatting tables
function format_table (t, depth, l)
local function format_table (t, depth, l)
-- TODO: Add more nuanced formatting.
-- Error Checking

View File

@ -2,6 +2,7 @@
package.path = package.path .. ';./test/?.lua;./src/?.lua'
local TEST_SUITE = require("TestSuite").new('pretty')
TEST_SUITE:enableStrictGlobal()
TEST_SUITE:addModules('test/test_*')
-- TEST_SUITE:generateRequireSubmodule 'require'
TEST_SUITE:setOptions(...)