forked from LuaJIT/LuaJIT-test-cleanup
katlogic/lest
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
This branch is 13 commits ahead, 63 commits behind LuaJIT:master.
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