This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 47584

Summary: EditablePropertiesTest file comparisons are platform-dependent
Product: utilities Reporter: _ tball <tball>
Component: DiffAssignee: Martin Entlicher <mentlicher>
Status: RESOLVED WONTFIX    
Severity: blocker CC: dkonecny
Priority: P2 Keywords: TEST
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description _ tball 2004-08-20 19:15:45 UTC
Maybe this is an unusual situation, but I have a
PC that dual-boots to WinXP and Linux.  To avoid
maintaining two source bases, I have NetBeans
source on a shared (vfat) partition.  

The problem is that if CVS fetches the source on
Linux but the commit-validation tests are run on
XP, then the testVersionability and testComment
tests in
org.netbeans.spi.project.support.antEditablePropertiesTest
fail:

testVersionability:
      junit.framework.AssertionFailedError: One
line modified expected:<1> but was:<106>

testComment:
      junit.framework.AssertionFailedError: No
lines modified expected:<0> but was:<107>

Theses errors appear to be due to the different
line-endings between WinXP and Linux.  Perhaps the
DiffProvider object that EditablePropertiesTest
uses needs to ignore line-ending differences,
since CVS automatically converts them.

What escalates this problem is that the
commit-validation test suite still fails on Linux
due to GUI timeout problems.  This forces me to
validate on WinXP before making any commits.
Comment 1 Jesse Glick 2004-08-20 19:48:59 UTC
Probably most easily fixed by deleting the file, committing, readding
it with -kb, and committing. Or perhaps the code really is incorrectly
handling variable newline conventions (which would I think be a bug in
the diff module).
Comment 2 David Konecny 2004-08-23 12:58:44 UTC
"Perhaps the DiffProvider object that EditablePropertiesTest uses
needs to ignore line-ending differences" - yes I agree with this.
Passing to diff module for evaluation.

"Probably most easily fixed by deleting the file, committing, readding
it with -kb, and committing" - this would not help Jesse. What test
does is that it #1) reads properties from golden property file, #2)
modifies one property and saves properties to new file, #3) uses diff
to compare golden file with newly created one and tests whether only
the expected number of lines are different, that's 1 line should be
modified but because of different line endings all lines (106) are
seen as modified.
Comment 3 Martin Entlicher 2004-08-27 14:41:13 UTC
The line ending differences should not be ignored by default IMHO.
UNIX diff program also report differences in this case. But we can add
an option for that.
Comment 4 David Konecny 2004-09-09 16:18:43 UTC
*** Issue 48771 has been marked as a duplicate of this issue. ***
Comment 5 Martin Entlicher 2005-01-11 18:14:12 UTC
This was not a requirement on diff module => changing to Enhancement.
Comment 6 _ tball 2005-11-15 20:37:06 UTC
Sounds like it will never be fixed, might as well take it off your queue.