moai/moai-dev — pull request #634 by robertwahler (2013-02-09 20:23:35+00:00)
Title: Add Lua argv global to Glut host, run 'main.lua' if host given no args

If the host is given no arguments, run 'main.lua' by default.

The host's argv is converted to the lua global 'arg'. See AKUSetArgv() for arg array order.

This allows the Moai binary to be a drop-in replacement for lua or luajit in the Busted (like Rspec) test framework. See

Example Busted Usage: Run all the specs in ../spec/modules

busted -l /home/robert/workspace/myproject/hosts/cmake/build/hosts/moai-untz -m '../spec/?.lua' ../spec/modules