From ecab5ca6c7191835302cb7baa0ba62726589db82 Mon Sep 17 00:00:00 2001 From: Cormac Shannon <> Date: Tue, 10 Mar 2026 21:44:37 +0000 Subject: [PATCH] Issue: lua test compatibility --- issues/24-test-lua-compatibility.md | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 issues/24-test-lua-compatibility.md diff --git a/issues/24-test-lua-compatibility.md b/issues/24-test-lua-compatibility.md new file mode 100644 index 00000000..30e54107 --- /dev/null +++ b/issues/24-test-lua-compatibility.md @@ -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. \ No newline at end of file