remove manual main definitions
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
// External programs can load Lib.kiss with (loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
|
||||||
(load "Lib.kiss")
|
(load "Lib.kiss")
|
||||||
|
|
||||||
(function :Void main []
|
(let [[archiveDir] (Sys.args)
|
||||||
(let [[archiveDir] (Sys.args)
|
|
||||||
controller
|
controller
|
||||||
(new ArchiveController
|
(new ArchiveController
|
||||||
(new Archive archiveDir)
|
(new Archive archiveDir)
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
(.trim (.toString (.readLine (Sys.stdin))))]
|
(.trim (.toString (.readLine (Sys.stdin))))]
|
||||||
(if (controller.commands.exists command)
|
(if (controller.commands.exists command)
|
||||||
(controller.runCommand (dictGet controller.commands command))
|
(controller.runCommand (dictGet controller.commands command))
|
||||||
(Sys.println "$command is not a valid command"))))))
|
(Sys.println "$command is not a valid command")))))
|
||||||
|
|
||||||
(defNew [])
|
(defNew [])
|
||||||
|
|
||||||
|
@@ -1,18 +1,13 @@
|
|||||||
// TODO external programs need to be able to find and (load) this path to get the macros:
|
// External programs can load Lib.kiss with (loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
|
||||||
// ^ That should be solved by allowing an optional first argument to load that is a symbol
|
|
||||||
// of a library name that can be used to resolve the source dir in the user's Haxelib maybe?
|
|
||||||
(load "../nat/Lib.kiss")
|
(load "../nat/Lib.kiss")
|
||||||
|
|
||||||
|
(assert (BoolExpInterp.eval "true" []))
|
||||||
(function :Void main []
|
(assert !(BoolExpInterp.eval "false" []))
|
||||||
(assert (BoolExpInterp.eval "true" []))
|
(assert !(BoolExpInterp.eval "flag" []))
|
||||||
(assert !(BoolExpInterp.eval "false" []))
|
(assert (BoolExpInterp.eval "flag" ["flag"]))
|
||||||
(assert !(BoolExpInterp.eval "flag" []))
|
(assert !(BoolExpInterp.eval "(and flag false)" ["flag"]))
|
||||||
(assert (BoolExpInterp.eval "flag" ["flag"]))
|
(assert (BoolExpInterp.eval "(or flag otherFlag)" ["otherFlag"]))
|
||||||
(assert !(BoolExpInterp.eval "(and flag false)" ["flag"]))
|
(let [archive
|
||||||
(assert (BoolExpInterp.eval "(or flag otherFlag)" ["otherFlag"]))
|
|
||||||
//trace(error);
|
|
||||||
(let [archive
|
|
||||||
(new Archive "src/test/example-archive")
|
(new Archive "src/test/example-archive")
|
||||||
song1
|
song1
|
||||||
(dictGet archive.entries "song1")
|
(dictGet archive.entries "song1")
|
||||||
@@ -32,4 +27,4 @@
|
|||||||
[author Author
|
[author Author
|
||||||
name Name]
|
name Name]
|
||||||
(assert (= author "Rafael Krux"))
|
(assert (= author "Rafael Krux"))
|
||||||
(assert (= name "Adventure")))))
|
(assert (= name "Adventure"))))
|
||||||
|
Reference in New Issue
Block a user