[file comarision] Wrong summaries of errors

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
angel
Junior Member
Junior Member
Posts: 46
Joined: 2014-10-17, 06:54 UTC
Location: Sofia, Bulgaria, Europe

[file comarision] Wrong summaries of errors

Post by *angel »

The total number of errors is wrong
Two text ANSI files

1.file1.txt:
rpcport=6332
port=6333

2.file2.txt:
rpcport=26332
port=36333

After comparison of these two files, the total result in the status bar is wrong:
=>1 differences found
but must be
=>2 differences found

Possible reason for the problem- the new line. If set some equal text (or new empty line) between 1 and 2 line of the two files, the result will be correct!
#381167 Single user license [08:50, 26.10.2022]
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [file comarision] Wrong summaries of errors

Post by *Dalai »

This is no bug. TC's Compare by Contents counts multiple adjacent/consecutive lines as a single difference, no matter how many lines there are in that block (could be hundreds or even thousands). For example: Make a text file like this:

Code: Select all

foobar
foobar
foobar
foobar
foobar
foobar
Now create a copy of that file and use some search&replace feature in your editor to replace "foo" with "foo ", i.e. append a space. Now compare these two files in TC and it will be one difference. Similar thing happens when the text is different at several locations within one line, it still counts as a single difference.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Post Reply