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 255396 - Failing PHP tests due to change 059d206acbfc
Summary: Failing PHP tests due to change 059d206acbfc
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: All All
: P1 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-18 10:39 UTC by Tomas Mysik
Modified: 2015-09-26 12:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2015-09-18 10:39:26 UTC
I just verified that your changeset [1] caused PHP tests [2] to fail. Please, have a look where the problem could be (the fix or the tests?).

Thanks.
[1] http://hg.netbeans.org/web-main/rev/059d206acbfc
[2] http://deadlock.netbeans.org/job/PHP-build/
Comment 1 Milutin Kristofic 2015-09-22 14:43:04 UTC
http://hg.netbeans.org/web-main/rev/d7eb279e9d13

I changed unit test, since I think current behavior is better then it was before. If somebody will provide arguments against this, I can revert changes in unit tests and change indenter.
Comment 2 Tomas Mysik 2015-09-23 06:19:58 UTC
Reopening, previous indentation was correct, at least in these cases:

arrays12.php.indented
multiline_function_call_23.php.indented
multiline_function_call_24.php.indented
objectOperatorContinue_11.php.indented
shortArrays12.php.indented

New indentation could stay for cases:

issue175437_12.php.indented
issue175437_13.php.indented

Thanks.
Comment 3 Milutin Kristofic 2015-09-23 14:18:35 UTC
I am working on this. I would like to leave my change with not changing document in indentation if string I am adding is same as a string I am removing. Test are failing with position of caret, since indentation was fixing caret position. I am now fixing this in php, so php type break interceptor will set caret right and not expecting indentation to fix caret position. However PHP indentation is differently indenting line when caret is on first nonwhitespace character and differently when caret is on first whitespace character. I am now trying to fix this different indenting, then I can fix this issue.
Comment 4 Quality Engineering 2015-09-24 01:29:21 UTC
Integrated into 'main-silver', will be available in build *201509240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d7eb279e9d13
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #255396 - Failing PHP tests due to change 059d206acbfc
Comment 5 Milutin Kristofic 2015-09-25 11:56:24 UTC
Tomas, thank you. I reverted indented versions of 
arrays12.php.indented
multiline_function_call_23.php.indented
multiline_function_call_24.php.indented
objectOperatorContinue_11.php.indented
shortArrays12.php.indented

and fixed them by changing caret with typing hooks.


http://hg.netbeans.org/web-main/rev/e69436718a30
Comment 6 Tomas Mysik 2015-09-25 11:57:47 UTC
Thanks a lot!
Comment 7 Quality Engineering 2015-09-26 12:58:36 UTC
Integrated into 'main-silver', will be available in build *201509261150* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e69436718a30
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #255396 - Failing PHP tests due to change 059d206acbfc