Page 1 of 1

[TC 9.51] Compare by text content, inproper results

Posted: 2021-09-10, 14:41 UTC
by Zygus
I have found out that comparing 2 text files doesn't give correct result in such scenario:
first file:
ABCD AA BB CC
ABCD AA BB DDD

second file:
ABCD CC
ABCD DDD

Comparation for 2 line will only mark "AA BB" because it is only difference beetween strings.
But in first line it will mark "AA BB" and also "CC" which is the same on both sides. Seems it just can't properly point difference if word has less than 3 letters.

Re: [TC 9.51] Compare by text content, inproper results

Posted: 2021-09-10, 16:22 UTC
by Horst.Epp
Confirmed for TC 10
Comparing the same files with Beyond Compare or WinMerge shows the correct diffs in line 1

Re: [TC 9.51] Compare by text content, inproper results

Posted: 2021-09-10, 20:20 UTC
by petermad
I can confirm it too.

Zygus wrote:Seems it just can't properly point difference if word has less than 3 letters
Yes, If I change CC in both files to CCC the expected result is shown.

Re: [TC 9.51] Compare by text content, inproper results

Posted: 2021-09-15, 10:46 UTC
by ghisler(Author)
This is intentional. TC looks for insertions/deletions, but 2 characters and less are ignored - im my tests, they found too many false positives when the insertion contained similar text.

Re: [TC 9.51] Compare by text content, inproper results

Posted: 2021-09-15, 12:49 UTC
by Zygus
Well, maybe user should have a possibility to decide to limit search to 3 characters or not? Because with longer files i have more work to compare them.
Example is as simple as i could create, normally i am not using this feature to compare ABCD with ABCD ...

Re: [TC 9.51] Compare by text content, inproper results

Posted: 2021-09-15, 17:15 UTC
by Horst.Epp
In an assembler source a 3 character diff may be a major problem if not detected.

Re: [TC 9.51] Compare by text content, inproper results

Posted: 2021-09-17, 19:05 UTC
by ghisler(Author)
It is still being detected, just not used for re-synchronization.