2 * Test the writer code...
8 void diff(string original, string data)
11 FileUtils.set_contents("/tmp/test.out",data);
12 string[] spawn_args = {"diff", "-w" , "-u", original, "/tmp/test.out" };
15 string[] spawn_env = Environ.get ();
17 Process.spawn_sync ("/",
20 SpawnFlags.SEARCH_PATH,
29 void testBuilderFile(string name, string test)
31 var dir = "/home/alan/gitlive/app.Builder.js/Builder4";
32 var proj = new Project.Gtk(dir );
34 //print(proj.toJSON(true));
36 var tf = proj.files.get(dir + "/" + name + ".bjs");
40 diff(dir + "/" + name + ".bjs", tf.toJsonString());
43 diff(dir + "/" + name + ".js", tf.toSource());
46 diff(dir + "/" + name + ".vala", tf.toValaSource(false));
49 print("invalid test?\n");
52 public static int main () {
53 new JsRender.Lang_Class();
54 GLib.Log.set_always_fatal(LogLevelFlags.LEVEL_ERROR | LogLevelFlags.LEVEL_CRITICAL);
56 //testBuilderFile("Editor", "JSON");
57 //testBuilderFile("Editor", "JS");
58 testBuilderFile("Editor", "VALA");