anchor.diff:  	 }).
   -record(testsuite,
   	{
  +          id = 0 :: integer(),
   	  name = <<>> :: binary(),
   	  time = 0 :: integer(),
   	  output = <<>> :: binary(),
  
positive.code:     XMLDir = proplists:get_value(dir, Options, ?XMLDIR),
      St = #state{verbose = proplists:get_bool(verbose, Options),
  		xmldir = XMLDir,
  		testsuite = #testsuite{}},
      receive
  	{start, _Reference} ->
  	    St
      end.
  
  terminate({ok, _Data}, St) ->
      TestSuite = St#state.testsuite,
      XmlDir = St#state.xmldir,
      write_report(TestSuite, XmlDir),
      ok;
  terminate({error, _Reason}, _St) ->
      %% Don't report any errors here, since eunit_tty takes care of that.
      %% Just terminate.
      ok.
  
  handle_begin(group, Data, St) ->
      NewId = proplists:get_value(id, Data),
      case NewId of
  	[] ->
  	    St;
  	[_GroupId] ->
  	    Desc = proplists:get_value(desc, Data),
  	    TestSuite = St#state.testsuite,
  	    NewTestSuite = TestSuite#testsuite{name = Desc},
  	    St#state{testsuite=NewTestSuite};
  	%% Surefire format is not hierarchic: Ignore subgroups:
  	_ ->
  	    St
      end;
  handle_begin(test, _Data, St) ->
      St.
  handle_end(group, Data, St) ->
      %% Retrieve existing test suite:
      case proplists:get_value(id, Data) of
  	[] ->
  	    St;
  	[_GroupId|_] ->
  	    TestSuite = St#state.testsuite,
  
  	    %% Update TestSuite data:
  	    Time = proplists:get_value(time, Data),
  	    Output = proplists:get_value(output, Data),
  	    NewTestSuite = TestSuite#testsuite{ time = Time, output = Output },
  	    St#state{testsuite=NewTestSuite}
      end;
  handle_end(test, Data, St) ->
      %% Retrieve existing test suite:
      TestSuite = St#state.testsuite,
  
      %% Create test case:
      Name = format_name(proplists:get_value(source, Data),
  
negative.code: -record(state, {verbose = false,
  		indent = 0,
  		xmldir = ".",
  		testsuites = [] :: [#testsuite{}]
  	       }).
  
  start() ->
  