On Tue, Oct 12, 2010 at 5:28 PM, Norman Clarke <[email protected]> wrote:
> Here is a rockspec for the first "stable" release of Telescope, a
> BDD-style test framework.

Very cute - I like the 'create custom assertions' feature.

Somewhat OT, I think this is a use case for a patched Lua. Internal
testing does not need to use stock Lua, and having the short anonymous
function syntax (|x| x*x is short for 'function(x) return x*x end')
implemented by metalua and Francesco Abbate's GSL Shell would make
writing tests easier on the fingers. Alternatively, the token-filter
patch plus LuaMacro allows for a \x (x*x) syntax, as suggested by lhf.
Custom macros can also get one closer to a DSL designed for testing.
(It's been suggested that LuaMacro gets a text-expansion mode so that
it could work like a traditional macro preprocessor if needed; that
would help with the portability of tests.)

Unfortunately, these patches are not likely to get in the mainstream version.

I think LuaRocks should be able to deliver patched Lua versions,
although the Windows case is awkward, since all extensions are linked
against lua5.1.dll (lua51.dll is provided as a proxy DLL) and that
would have to be replaced;  Unix is more friendly since its version of
dynamic linking is not bound to a particular shared library name.

(I've been thinking of making up a rock for luajit, and wondering
about the potential conflicts involved.)

steve d.

_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers

Reply via email to