Provide a default {} value for script categories.

This is so I don't have to write
  categories = {}
when writing test scripts.
This commit is contained in:
david 2012-08-28 12:17:36 +00:00
parent fdac9750a1
commit 676de05f7f

View file

@ -418,6 +418,7 @@ do
return nil;
end
-- Script.new provides defaults for some of these.
local required_fields = {
action = "function",
categories = "table",
@ -469,6 +470,7 @@ do
local env = {
SCRIPT_PATH = filename,
SCRIPT_NAME = short_basename,
categories = {},
dependencies = {},
};
setmetatable(env, {__index = _G});