Merge branch 'rewrite' into jonte_rewrite
This commit is contained in:
commit
dfc17729d6
2 changed files with 10 additions and 2 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 5350ed21606606dbee5ecb07e974f2abb9106270
|
Subproject commit 2f2785fafb0da6db75810eb6fa97d09c58257588
|
|
@ -119,4 +119,12 @@ user_command_test() ->
|
||||||
define(GameVM, "var t = '';\nfunction userCommand(user, command, args) { t = user + command + args; }\n"),
|
define(GameVM, "var t = '';\nfunction userCommand(user, command, args) { t = user + command + args; }\n"),
|
||||||
user_command(GameVM, "'jeena", "thecommand", "theargs'"),
|
user_command(GameVM, "'jeena", "thecommand", "theargs'"),
|
||||||
?assertMatch(<<"'jeenathecommandtheargs'">>, gen_server:call(GameVM, {eval, "t;"})).
|
?assertMatch(<<"'jeenathecommandtheargs'">>, gen_server:call(GameVM, {eval, "t;"})).
|
||||||
|
|
||||||
|
js_erlang_test() ->
|
||||||
|
GameVM = start_link(test_table),
|
||||||
|
define(GameVM, "var t = '';\nfunction userCommand(user, command, args) { t = callErlang('erlang time') + ''; }\n"),
|
||||||
|
user_command(GameVM, "", "", ""),
|
||||||
|
{A, B, C} = erlang:time(),
|
||||||
|
T = "{" ++ integer_to_list(A) ++ ", " ++ integer_to_list(B) ++ ", " ++ integer_to_list(C) ++ "}",
|
||||||
|
?assertMatch(T, binary_to_list(gen_server:call(GameVM, {eval, "t;"}))).
|
||||||
|
|
||||||
|
|
Reference in a new issue