anchor.diff:  	 handle_cast/2,
   	 handle_info/2,
   	 terminate/2,
  -	 code_change/3
  +	 code_change/3,
  +
  +	 test/0
   	]).
   
   %%--------------------------------------------------------------------
  
positive.code: 	    E
      end;
  parse_term([H | _T], _UserList, _AddrList) ->
      {error, io_lib:format("sipuserdb_file: Unknown data : ~p", [H])}.
  
  %%--------------------------------------------------------------------
  %% Function: parse_user(Params, U)
  %%           Params = list() of {Key, Value} tuple()
  %%           U      = user record()
  %% Descrip.: Parse a user entry.
  %% Returns : User            |
  %%           {error, Reason}
  %%           User   = user record()
  %%           Reason = string()
  %%--------------------------------------------------------------------
  parse_user([], U) when is_record(U, user) ->
      U;
  parse_user([{name, V} | T], U) when is_record(U, user) ->
      parse_user(T, U#user{name=V});
  parse_user([{password, V} | T], U) when is_record(U, user) ->
      parse_user(T, U#user{password=V});
  parse_user([{classes, V} | T], U) when is_record(U, user) ->
      parse_user(T, U#user{classes=V});
  parse_user([{forward, V} | T], U) when is_record(U, user) ->
      parse_user(T, U#user{forward=V});
  parse_user([H | _T], U) when is_record(U, user) ->
      E = io_lib:format("bad data in user record (name ~p) : ~p", [U#user.name, H]),
      {error, E}.
  
  %%--------------------------------------------------------------------
  %% Function: parse_address(Params, A)
  
negative.code: parse_term([], UserList, AddrList) ->
      {ok, lists:reverse(UserList), lists:reverse(AddrList)};
  parse_term([{user, Params} | T], UserList, AddrList) ->
      case parse_user(Params, #user{}, []) of
  	{ok, R, []} when is_record(R, user) ->
  	    parse_term(T, [R | UserList], AddrList);
  	{ok, R, Addrs} when is_record(R, user), is_list(Addrs) ->
  	    case parse_addresses(R#user.name, Addrs, AddrList) of
  		L when is_list(L) ->
  		    %% Parse addresses listed together with user
  		    parse_term(T, [R | UserList], lists:reverse(L));
  		E ->
  		    E
  	    end;
  	E ->
  	    E
      end;
  