/+junk/gjs-vapi

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/gjs-vapi

« back to all changes in this revision

Viewing changes to test.vala

  • Committer: Gustav Hartvigsson
  • Date: 2021-09-13 19:52:56 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210913195256-axsvp0cjbi32ups2
* Added comments to the VAPI file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
  string js_paths[] = {"resource:///gjs/test/vapi/test/",
12
12
                       null};
13
13
  
14
 
  var ctx = new Context.with_search_path (js_paths);
15
 
  int i;
 
14
  var ctx = (Context) GLib.Object.@new (typeof (Context) , 
 
15
                                            "program-name", "test",
 
16
                                            "search-path", js_paths);
16
17
  
 
18
  int t_i;
17
19
  try {
18
 
    var b = ctx.eval_file ("test.js", out i);
 
20
    ctx.set_argv (args);
 
21
    var b = ctx.eval_file ("test.js", out t_i);
 
22
    print (ctx.program_name + "\n");
19
23
    b = bool.parse (b.to_string ());
20
24
  } catch (GLib.Error e) {
21
25
    print (e.message + "\n");
22
26
  }
 
27
  
23
28
  return 0;
24
29
}