1This tarball contains the official test scripts for Lua 5.1. 2Unlike Lua itself, these tests do not aim portability, small footprint, 3or easy of use. (Their main goal is to try to crash Lua.) They are not 4intended for general use. You are wellcome to use them, but expect to 5have to "dirt your hands". 6 7The 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 14To 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-------------------------------------------- 25Internal tests 26-------------------------------------------- 27 28Some tests need a special library, "testC", that gives access to 29several internal structures in Lua. 30This library is only available when Lua is compiled in debug mode. 31The scripts automatically detect its absence and skip those tests. 32 33If you want to run these tests, move etc/ltests.c and etc/ltests.h to 34the directory with the source Lua files, and recompile Lua with 35the option -DLUA_USER_H='"ltests.h"' (or its equivalent to define 36LUA_USER_H as the string "ltests.h", including the quotes). This 37option not only adds the testC library, but it adds several other 38internal tests as well. After the recompilation, run the tests 39as before. 40 41 42