I am writing several test scripts for my Lua project, and I want to make sure that they work correctly under different versions of Lua. Since my unit testing framework may use the wrong version of Lua, if I configured it incorrectly, I would like to be more secure and check at runtime which version of Lua my tests run on. What would be the best way to do this?
I know that a quick way to say 5.1 and 5.2 separately is to check globality _VERSION, but how can I talk about regular Lua 5.1 and LuaJIT?
source
share