aboutsummaryrefslogtreecommitdiff
path: root/testes/main.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* DetailsRoberto Ierusalimschy2025-02-261-1/+4
| | | | | Comments, small changes in the manual, an extra test for errors in error handling, small changes in tests.
* Local declaration in the REPL generates a warningRoberto Ierusalimschy2024-09-271-0/+9
|
* Removed compatibility with "= exp" in the REPLRoberto Ierusalimschy2024-07-051-1/+1
|
* Fixed bug in 'multiline'Roberto Ierusalimschy2024-07-051-0/+5
| | | | | | 'incomplete' was popping error message that should be used in case there is no more lines to complete the input, that is, 'pushline' returns NULL, due to end of file.
* lua.c loads 'readline' dynamicallyRoberto Ierusalimschy2024-07-041-9/+7
| | | | | | | (See comments in luaconf.h.) This change allows easier compilation, as Lua compiles and works even if the package 'readline' is absent from the system. Moreover, non-interactive uses don't load the library, making the stand-alone slightly faster for small loads.
* DetailsRoberto Ierusalimschy2024-03-131-2/+2
| | | | | | - 'unsigned int' -> 'unsigned' - Some explicit casts to avoid warnings - Test avoids printing the value of 'fail' (which may not be nil)
* Merge branch 'master' into nextversionRoberto Ierusalimschy2023-06-221-20/+30
|\
| * Option '-l' discards version sufix from file nameRoberto Ierusalimschy2023-05-151-0/+7
| | | | | | | | | | | | Like 'require', the command-line option '-l' discards an optional version suffix (everything after an hyphen) from a file name when creating the module name.
| * Small improvements in testsRoberto Ierusalimschy2023-05-151-20/+23
| |
* | Merge branch 'master' into nextversionRoberto Ierusalimschy2022-12-281-2/+2
|\|
| * Avoid excessive name pollution in test filesRoberto Ierusalimschy2022-12-281-2/+2
| | | | | | | | | | Test files are more polite regarding the use of globals when locals would do, and when globals are necessary deleting them after use.
* | Towards Lua 5.5Roberto Ierusalimschy2022-12-201-3/+3
|/
* Simpler handling of Byte Order Mark (BOM)Roberto Ierusalimschy2022-08-231-5/+30
|
* Bug: finalizer calling exit can corrupt finalization orderRoberto Ierusalimschy2021-12-221-0/+28
| | | | | 'os.exit' can call lua_close again, separating new finalizers created after all previous finalizers were already separated.
* Option '-l' can give a name for the global variable.Roberto Ierusalimschy2021-08-161-0/+5
| | | | Sintax for this option now is '-l [globname=]modname'.
* _PROMPT can have non-string valuesRoberto Ierusalimschy2020-10-261-0/+27
| | | | | | 'get_prompt' uses 'luaL_tolstring' to convert _PROMPT or _PROMPT2 value to a string. That conversion may invoke a '__tostring' metamethod.
* Avoid memory allocation in some functions from 'ltests.c'Roberto Ierusalimschy2020-07-041-3/+3
| | | | | | | To allow their use in memory tests, some functions in 'ltests.c' should never allocate memory. To avoid this allocation, the library registers the strings used for status codes, and keeps the variable '_WARN' always defined (with false instead of nil).
* Default for warnings changed to "off"Roberto Ierusalimschy2019-08-201-4/+7
| | | | | Warnings are mostly a tool to help developers (e.g., by showing hidden error messages); regular users usually don't need to see them.
* Detail (extra test for warnings when closing state)Roberto Ierusalimschy2019-08-191-0/+11
|
* Improvement in warn-mode '@store' (for testing)Roberto Ierusalimschy2019-08-181-3/+3
| | | | | | When using warn-mode '@store', from the test library, the tests ensure not only that the expected warnings were issued, but also that there was no extra warnings.
* Added control messages to warningsRoberto Ierusalimschy2019-08-151-0/+29
| | | | | | | Added the concept of control messages to the warning system, plus the implementation of the controls "@on"/"@off" to turn warnings on/off. Moreover, the warning system in the test library adds some other controls to ease the test of warnings.
* Fixed test in 'main.lua'Roberto Ierusalimschy2019-07-301-7/+10
| | | | | | | The test "to-be-closed variables in main chunk" was broken, as it used the removed feature of functions as to-be-closed values. The error was not detected because its expected result had no lines to be checked (due to missing new lines).
* Change in the syntax of attributesRoberto Ierusalimschy2019-07-301-2/+2
| | | | | | | Attributes changed to posfixed ('x <const>', instead of '<const> x'), and "toclose" renamed to "close". Posfixed attributes seem to make it clearer that it applies to only one variable when there are multiple variables.
* Function 'warn' is varargRoberto Ierusalimschy2019-06-041-1/+17
| | | | | | | Instead of a 'tocont' flag, the function 'warn' in Lua now receives all message pieces as multiple arguments in a single call. Besides being simpler to use, this implementation ensures that Lua code cannot create unfinished warnings.
* Flag for to-be-closed variables changed to '<toclose>'Roberto Ierusalimschy2019-05-091-2/+2
| | | | | | | The flag for to-be-closed variables was changed from '*toclose' to '<toclose>'. Several people found confusing the old syntax and the new one has a clear terminator, making it more flexible for future changes.
* Avoid the creation of too many strings in 'package'Roberto Ierusalimschy2019-05-031-8/+19
| | | | | | | | | Both when setting a path and searching for a file ('searchpath'), this commit reduces the number of intermediate strings created in Lua. (For setting a path the change is not relevant, because this is done only twice when loading the module. Anyway, it is a nice example of how to use auxlib buffers to manipulate strings in the C API.)
* New functions 'lua_resetthread' and 'coroutine.kill'Roberto Ierusalimschy2018-12-131-5/+19
| | | | | | New functions to reset/kill a thread/coroutine, mainly (only?) to close any pending to-be-closed variable. ('lua_resetthread' also allows a thread to be reused...)
* Added directory to test file names in '$Id:'Roberto Ierusalimschy2018-07-251-1/+1
| | | | | | | From the point of view of 'git', all names are relative to the root directory of the project. So, file names in '$Id:' also should be relative to that directory: the proper name for test file 'all.lua' is 'testes/all.lua'.
* Added manual and tests for version 5.4-w2Roberto Ierusalimschy2018-07-091-0/+381