I guess it depends upon what you mean by testing. If it's just to test for syntax errors etc you can download
http://luaforge.net/projects/lua-wow/. With that you can do luac -p <name of file> though I think they've compiled the exes to something like wow-lua.exe I changed mine to lua.exe etc. Easier to type
. That is a modified version of lua that contains function like the new table.wipe function. I find it very useful.
There was an attempt at an
emulator for testing addons without wow. I think the project has been put on hold nor have I ever tried it.