compileToFile() working for hello world
This commit is contained in:
@@ -9,15 +9,15 @@ import haxe.macro.Context;
|
||||
#end
|
||||
|
||||
class CompilerToolsTestCase extends Test {
|
||||
function testCompileHelloWorld() {
|
||||
Assert.equals("Hello, world!", _testCompileHelloWorld());
|
||||
function testCompileHelloWorldJs() {
|
||||
Assert.equals("Hello world!", _testCompileHelloWorldJs());
|
||||
}
|
||||
|
||||
static macro function _testCompileHelloWorld() {
|
||||
static macro function _testCompileHelloWorldJs() {
|
||||
var runHelloWorld = CompilerTools.compileFileToScript(
|
||||
"kiss/template/src/template/Main.kiss", {
|
||||
lang: JavaScript,
|
||||
outputFolder: "bin/js",
|
||||
outputFolder: "bin/helloWorldJsTest",
|
||||
});
|
||||
|
||||
return {
|
||||
@@ -25,4 +25,25 @@ class CompilerToolsTestCase extends Test {
|
||||
expr: EConst(CString(runHelloWorld(), DoubleQuotes))
|
||||
};
|
||||
}
|
||||
|
||||
function testCompileHelloWorldPy() {
|
||||
Assert.equals("Hello world!", _testCompileHelloWorldPy());
|
||||
}
|
||||
|
||||
static macro function _testCompileHelloWorldPy() {
|
||||
var runHelloWorld = CompilerTools.compileFileToScript(
|
||||
"kiss/template/src/template/Main.kiss", {
|
||||
lang: Python,
|
||||
outputFolder: "bin/helloWorldPyTest",
|
||||
});
|
||||
|
||||
return {
|
||||
pos: Context.currentPos(),
|
||||
expr: EConst(CString(runHelloWorld(), DoubleQuotes))
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO test what happens when passing more arguments/files
|
||||
}
|
||||
|
Reference in New Issue
Block a user