anchor.diff:      % garbage collected half way through processing
       io_lib:format("~p processed~n", [Ref]).
   
  -callback_test_process(Pid) ->
  -    receive
  -        die -> ok;
  -        Message -> 
  -            {_, Sender} = lists:keyfind(<<"sender">>, 1, Message),
  -            reply(Sender, [{pid, Pid}]),
  -            callback_test_process(Pid)
  -    end.
  -
  -callback_test() ->
  -    {ok, Script} = file:read_file("../scripts/main.lua"),
  -    {ok, Ref} = run(Script),
  -    ?assertEqual(ok, load(Ref, [<<"../scripts/libs">>,<<"../test_scripts">>,<<"../test_scripts/callback_test">>], <<"callback_test">>)),
  -    EchoPid = spawn(nodelua, callback_test_process, [self()]),
  -    ?assertEqual(ok, send(Ref, [{echo, EchoPid}])),
  -    receive
  -        <<"async-test">> -> EchoPid ! die, ok
  -    end.
  -
   -endif.
  
positive.code:     run_core(Script).
  
  send(Lua, Message) ->
      send_core(Lua, [{pid, self()}, {type, mail}, {data, Message}]).
  
  load(Lua, Path, Module) ->
      send_core(Lua, [{pid, self()}, {type, load}, {module, Module}, {path, Path}]).
  
  reply(LuaCallback, Response) ->
      {1.0, Lua} = lists:nth(1, LuaCallback),
      {2.0, CallbackId} = lists:nth(2, LuaCallback),
      send_core(Lua, [{pid, self()}, {callback_id, CallbackId}, {type, reply}, {reply, Response}]).
  
  run_core(_Script) ->
      ?nif_stub.
  
negative.code:     ?assertEqual(ok, send(Ref, ok)).
  
  bounce_message(Ref, Message) ->
      send(Ref, { {data, Message}, {pid, self()} }),
      receive 
          Response -> 
              Response
  