anchor.diff:      %% Feed etorrent the file to work with
       {ok, _} = file:copy(Fn, SrcFn),
       {ok, _} = file:copy(BrokenFn, DestFn),
  +    [error(files_are_equal) || compare_file_contents(SrcFn, DestFn)],
       %% Copy torrent-file to torrents-directory
       {ok, _} = copy_to(TorrentFn, ?config(dir, SNodeConf)),
       start_app(SNode, SNodeConf),
  
positive.code: %% Tests
  %% ----------------------------------------------------------------------
  groups() ->
      Tests = [checking, choked_reject, seed_transmission, leech_transmission,
               seed_leech, partial_downloading, udp_seed_leech, bep9,
               down_udp_tracker, choked_seed_leech],
  %   [{main_group, [shuffle], Tests}].
      [{main_group, [], Tests}].
  
  
negative.code: enable_dht(AppConfig) ->
      [{dht, true}|AppConfig].
  
  
  %% Returns true, if files are equal.
  compare_file_contents(Fn1, Fn2) ->
      {ok, Fd1} = file:open(Fn1, [binary, read]),
      {ok, Fd2} = file:open(Fn2, [binary, read]),
      IsEqual = compare_file_contents_1(Fd1, Fd2, 0, 100000),
      file:close(Fd1),
      file:close(Fd2),
      IsEqual.
  
  compare_file_contents_1(Fd1, Fd2, Offset, ChunkSize) ->
      case {file:pread(Fd1, Offset, ChunkSize),
            file:pread(Fd2, Offset, ChunkSize)} of
          {eof, eof} -> true;
          {{ok, X}, {ok, X}} -> compare_file_contents_1(Fd1, Fd2, Offset+ChunkSize, ChunkSize);
          {{ok, _}, {ok, _}} -> false
      end.
  