Skip to content

Instantly share code, notes, and snippets.

@TBD
Created February 23, 2010 14:45
Show Gist options
  • Save TBD/312231 to your computer and use it in GitHub Desktop.
Save TBD/312231 to your computer and use it in GitHub Desktop.
// --- functions required
function require(arg) {
var ret = load(arg+".js")
//print(ret + ": loading " + arg + "\n")
}
var module = ""
require("rewriter")
require("scope")
require("nodes")
require("lexer")
require("parser")
require("coffee-script")
require("command_line")
require("optparse")
// --- tests
var path = "../test/"
var x = system.files(path+"*.coffee")
var f;
var tests = 0;
function ok(args) {if (args){tests += 1}}
function throws(args) {if (args){tests += 1}}
var start_time = new Date()
for (var i in x) {
print(x[i]+"\n")
f = new Stream(path + x[i]).read()
eval(CoffeeScript.compile(f))
}
var time = ((new Date() - start_time) / 1000).toFixed(2)
print("passed " + tests + " tests in " + time + "seconds\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment