Closed lua-rocks closed 2 years ago
there's a commandline flag to set a different Lua engine. Here's an example that does the same for OpenResty: https://github.com/Olivine-Labs/busted/issues/414#issuecomment-792614808
If you get it to work, would you mind posting your solution here?
maybe just using the --lua
option is good enough?
--lua=LUA The path to the lua interpreter busted
should run under
The problem is that even though these programs use lua, they are not lua interpreters. I.e., busted should somehow be run inside them.
If LÖVE cannot be called as a Lua interpreter then you'll have to write a small wrapper to fire off the tests yourself. You can write a script and use busted.runner
to run tests, but you'll want to set some environment variables first to simulate the input the runner would have gotten from the CLI.
There is some information along those lines in #482. I'm going to close this as a duplicate of that issue, but I'd be happy to re-open and discuss further if there is something I'm not understanding about LÖVE and this suggestion doesn't work out. That other issue is open to track improvements to make it easier to run in that kind of embedded mode in an already running Lua environment as a library rather than the top level tool that calls Lua.
Is it possible to provide access in tests to table from external application which use lua, such as love or tic80? Can I use these applications as lua interpreter for tests?