Merge branch 'rewrite' into jonte_rewrite

This commit is contained in:
Jonatan Pålsson 2011-02-22 00:17:46 +01:00
commit dfc17729d6
2 changed files with 10 additions and 2 deletions

@ -1 +1 @@
Subproject commit 5350ed21606606dbee5ecb07e974f2abb9106270
Subproject commit 2f2785fafb0da6db75810eb6fa97d09c58257588

View file

@ -119,4 +119,12 @@ user_command_test() ->
define(GameVM, "var t = '';\nfunction userCommand(user, command, args) { t = user + command + args; }\n"),
user_command(GameVM, "'jeena", "thecommand", "theargs'"),
?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;"}))).