Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 529e27db6a
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (21 sloc) 0.745 kb
let fs = require 'fs'
let path = require 'path'
let child_process = require 'child_process'
let dir = "test"
let files = fs.readdirSync dir
let tests = files.filter (fn x =
(x.lastIndexOf '.roy') == (x.length - 4)
)
tests.forEach (fn t =
let name = path.join dir t
let outFile = (path.join dir (path.basename t '.roy')) ++ '.out'
child_process.exec './roy -r ' ++ name (fn error stdout stderr =
if error then
console.log "Error:" error.message
else
let expected = fs.readFileSync outFile 'utf8'
let actual = stdout.toString ()
console.assert actual == expected "Output of " ++ t ++ ": " ++ (JSON.stringify actual) ++ " does not match " ++ (JSON.stringify expected)
console.log "Pass:" name
)
)
Jump to Line
Something went wrong with that request. Please try again.