local test = require "core.test"

test.describe("globals", function()
  test.test("exports the documented runtime globals", function()
    test.type(ARGS, "table")
    test.type(ARCH, "string")
    test.type(PLATFORM, "string")
    test.type(SCALE, "number")
    test.type(EXEFILE, "string")
    test.type(HOME, "string")
    test.type(LUAJIT, "boolean")
    test.type(DATADIR, "string")
    test.type(USERDIR, "string")
    test.type(EXEDIR, "string")
    test.type(DEFAULT_FPS, "number")
    test.type(DEFAULT_SCALE, "number")
    test.ok(PATHSEP == "/" or PATHSEP == "\\")
    test.type(MOD_VERSION_MAJOR, "number")
    test.type(MOD_VERSION_MINOR, "number")
    test.type(MOD_VERSION_PATCH, "number")
    test.type(MOD_VERSION_STRING, "string")
    test.type(VERSION, "string")
    test.equal(MOD_VERSION_STRING, VERSION:match("^%d+%.%d+%.%d+") or MOD_VERSION_STRING)
  end)
end)
