#!/usr/bin/env bash
# LEGAL: COPYRIGHT (C) 2010 JIM E. BROOKS WWW.PALOMINO3D.ORG

for SCRIPT in `ls *.lua`; do
    # Exclude non-tests.
    if [ "$SCRIPT" != "pre.lua" ]; then
        echo "-------------------------------------------"
        echo "Lua ${SCRIPT}"
        echo "-------------------------------------------"
        if ( lua $SCRIPT ); then
            echo "[ Lua ${SCRIPT} passed (ok). ]"
        else
            echo "[ ## Lua ${SCRIPT} FAILED!! ## ]"
            exit 1
        fi
    fi
    shift
done

exit 0
