01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.wikitext.widgets;
04:
05: import fitnesse.html.HtmlUtil;
06:
07: public class LineBreakWidgetTest extends AbstractWidget {
08:
09: public void testRegexp() throws Exception {
10: assertMatches("\n");
11: assertMatches("\r");
12: assertMatches("\r\n");
13: }
14:
15: public void testHtml() throws Exception {
16: LineBreakWidget widget = new LineBreakWidget(
17: new MockWidgetRoot(), "\n");
18: assertEquals(HtmlUtil.BR.toString(), widget.render());
19: }
20:
21: protected String getRegexp() {
22: return LineBreakWidget.REGEXP;
23: }
24: }
|