RPA Toolkit
build changes for macos. jrs is still broken - objcopy doesn't work
[rpatk.git] / tests / testrjs / rjs-args.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <sys/types.h>
4 #include <sys/stat.h>
5 #include <sys/types.h>
6 #include <fcntl.h>
7 #include <unistd.h>
8 #include <sys/mman.h>
9
10 #include "rlib/rstring.h"
11 #include "rjs/rjs.h"
12
13
14 int main(int argc, char *argv[])
15 {
16         rjs_engine_t *jse = rjs_engine_create();
17         char test_script1[] = "print('ARGS[0]: ' + ARGS[0]); print('ARGS[1]: ' + ARGS[1]);print('ARGS.count: ' + ARGS.count);(ARGS[0]+ARGS[1])*3;";
18
19 //      jse->debugexec = 1;
20         r_printf("result: %ld\n", rvm_reg_signed(rjs_engine_args_exec_s(jse, test_script1, 2, rvm_reg_create_signed(2), rvm_reg_create_signed(3))));
21         rjs_engine_destroy(jse);
22         return 0;
23 }