Issue: lua test compatibility
This commit is contained in:
49
issues/24-test-lua-compatibility.md
Normal file
49
issues/24-test-lua-compatibility.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# 24 — Test against major Lua projects
|
||||
|
||||
**Status:** open
|
||||
|
||||
## Problem
|
||||
|
||||
Lush modifies the Lua core (parser, lexer, runtime). We need to verify that these changes don't break compatibility with real-world Lua code.
|
||||
|
||||
## Projects to test against
|
||||
|
||||
### Language compliance (start here)
|
||||
|
||||
- **Lua 5.4 test suite** (`testes/`) — the gold standard; tests edge cases of the language spec directly
|
||||
- **LuaJIT test suite** — good for catching subtle semantic differences; also runs the official Lua tests
|
||||
|
||||
### Embedded / scripting (real-world stress tests)
|
||||
|
||||
- **Neovim** — uses Lua extensively for config and plugins; large test suite using `busted`
|
||||
- **OpenResty / nginx-lua** (`lua-nginx-module`) — huge `t/` test directory using Test::Nginx
|
||||
- **Kong** — API gateway built on OpenResty; thousands of test cases, stresses coroutines, metatables, and C API
|
||||
|
||||
### Game engines
|
||||
|
||||
- **Minetest (Luanti)** — open source voxel engine, massive Lua modding API with tests
|
||||
- **LÖVE (love2d)** — 2D game framework; community test suites
|
||||
- **Defold** — game engine with Lua scripting and integration tests
|
||||
|
||||
### Lua tooling / frameworks
|
||||
|
||||
- **Luacheck** — linter with a large Lua test suite
|
||||
- **busted** — BDD test framework with good self-coverage
|
||||
- **lua-TestMore** — port of Perl's Test::More to Lua
|
||||
|
||||
## Recommended priority
|
||||
|
||||
1. `testes/` from official Lua 5.4 source — most authoritative
|
||||
2. Neovim's test suite — real-world, large scale
|
||||
3. Kong's test suite — stresses coroutines, metatables, and C API
|
||||
4. LuaJIT test suite — catches subtle semantic differences
|
||||
|
||||
## Goal
|
||||
|
||||
Confirm that standard Lua programs run correctly on Lush without modification. Any failures should be triaged as either acceptable (due to intentional syntax changes) or bugs to fix.
|
||||
|
||||
## Implementation
|
||||
|
||||
Add a new dir to the gitignore.
|
||||
Clone/pull a set of projects that use lua and have a test suite.
|
||||
Run their tests using our language.
|
||||
Reference in New Issue
Block a user