github.com/hootrhino/gopher-lua@v1.0.3/_lua5.1-tests/README (about)

     1  This tarball contains the official test scripts for Lua 5.1.
     2  Unlike Lua itself, these tests do not aim portability, small footprint,
     3  or easy of use. (Their main goal is to try to crash Lua.) They are not
     4  intended for general use. You are wellcome to use them, but expect to
     5  have to "dirt your hands".
     6  
     7  The tarball should expand in the following contents:
     8    - several .lua scripts with the tests
     9    - a main "all.lua" Lua script that invokes all the other scripts
    10    - a subdirectory "libs" with an empty subdirectory "libs/P1",
    11      to be used by the scripts
    12    - a subdirectory "etc" with some extra files
    13  
    14  To run the tests, do as follows:
    15  
    16  - go to the test directory
    17  
    18  - set LUA_PATH to "?;./?.lua" (or, better yet, set LUA_PATH to "./?.lua;;"
    19    and LUA_INIT to "package.path = '?;'..package.path")
    20  
    21  - run "lua all.lua"
    22  
    23  
    24  --------------------------------------------
    25  Internal tests
    26  --------------------------------------------
    27  
    28  Some tests need a special library, "testC", that gives access to
    29  several internal structures in Lua.
    30  This library is only available when Lua is compiled in debug mode.
    31  The scripts automatically detect its absence and skip those tests.
    32  
    33  If you want to run these tests, move etc/ltests.c and etc/ltests.h to
    34  the directory with the source Lua files, and recompile Lua with
    35  the option -DLUA_USER_H='"ltests.h"' (or its equivalent to define
    36  LUA_USER_H as the string "ltests.h", including the quotes). This
    37  option not only adds the testC library, but it adds several other
    38  internal tests as well. After the recompilation, run the tests
    39  as before.
    40  
    41