This is a sanity/regression test suite for everything colloquially known as "Lua" - Lua 5.1 to 5.3, and LuaJIT 2.0/2.1. It has no external dependencies other than Lua itself and should run on all POSIX platforms and Win32. To use it, simply launch test.lua in its directory: $ lua test.lua You can specify particular interpreter to test, for example: $ lua test.lua /usr/local/bin/lua5.3 And finally, you can specify command line options for target interpreter: $ lua test.lua /usr/local/bin/luajit -Joff Behavior can be changed through the following environment variables: TSKIP - skip errors (print 'E' instead of abort) TDEBUG - verbosely display tests performed TFILTER- Lua pattern of tests to take (for example "^lua/.*") The tests are based on: https://github.com/LuaJIT/LuaJIT-test-cleanup http://www.lua.org/tests/ All tests are self-contained, on purpose. This leads to a little bit of code duplication, but offers the advantage of having "clean slate" when examining a test failure. Tests are always executed in their own fresh instance of specified interpreter. The tests exclude C interface (apart from libraries which come with target system, and can be loaded via FFI). It's a portability hell to deal with those, plus it inevitably introduces dependencies. C API testing would deserve a separate package focusing only on that. Some tests are allowed to fail under certain circumstances. These are known as "deviants", defined in deviants.lua. Usually they are the subtle differences between Lua versions, but also known bugs. Note that even if we know a test would fail on given version, we run it anyway - maybe our Lua is hacked to have cross-version compatibility, or bug fixed - state of which would be determined. Ideally deviants.lua should be only incompatibility matrix between common Lua versions. Directory structure (testing order): lua/ - common lua tests luajit/ - tests to run if luajit is detected ffi/ - tests to run if require('ffi') succeeds nojit/ - tests to run if luajit, but enforce interpreter jit/ - tests to run if luajit, but enforce jit deviants.lua - compatibility matrix