Lines 439-442
Link Here
|
439 |
final String result = testFormat(input); |
439 |
final String result = testFormat(input); |
440 |
assertEquals(expected, result); |
440 |
assertEquals(expected, result); |
441 |
} |
441 |
} |
|
|
442 |
|
443 |
/** |
444 |
* [formatting] Javadoc formatting: extra newline with [pre] |
445 |
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=52921 |
446 |
* <p> |
447 |
* This test only formats once. |
448 |
* </p> |
449 |
*/ |
450 |
public void testNoExtraNewlineWithPre1() { |
451 |
setUserOption(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_SOURCE, DefaultCodeFormatterConstants.TRUE); |
452 |
String input= PREFIX + DELIMITER + INFIX + "<pre>wrap here</pre>" + DELIMITER + POSTFIX; //$NON-NLS-1$ |
453 |
String expected= PREFIX + DELIMITER + INFIX + "<pre>" + DELIMITER + INFIX + "wrap here" + DELIMITER + INFIX + "</pre>" + DELIMITER + POSTFIX; //$NON-NLS-1$; //$NON-NLS-2$; //$NON-NLS-3$; |
454 |
String result= testFormat(input); |
455 |
assertEquals(expected, result); |
456 |
|
457 |
// now re-format several times |
458 |
result= testFormat(result); |
459 |
result= testFormat(result); |
460 |
result= testFormat(result); |
461 |
result= testFormat(result); |
462 |
|
463 |
// XXX: workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=99738 |
464 |
String WORKAROUND_BUG_99738= " "; //$NON-NLS-1$ |
465 |
expected= PREFIX + DELIMITER + INFIX + "<pre>" + DELIMITER + INFIX + WORKAROUND_BUG_99738 + "wrap here" + DELIMITER + INFIX + "</pre>" + DELIMITER + POSTFIX; //$NON-NLS-1$; //$NON-NLS-2$; //$NON-NLS-3$; |
466 |
assertEquals(expected, result); |
467 |
} |
468 |
|
442 |
} |
469 |
} |