From 41a521850b3d6db74a460d66f462016c85b8f499 Mon Sep 17 00:00:00 2001 From: gnosygnu Date: Mon, 18 Nov 2019 05:25:22 -0500 Subject: [PATCH] TemplateStyles: Add unit test for single-word paragraph bug [#616] --- .../template_styles/Template_styles_nde_tst.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/400_xowa/src/gplx/xowa/xtns/template_styles/Template_styles_nde_tst.java b/400_xowa/src/gplx/xowa/xtns/template_styles/Template_styles_nde_tst.java index 4368bd260..1ae23e25d 100644 --- a/400_xowa/src/gplx/xowa/xtns/template_styles/Template_styles_nde_tst.java +++ b/400_xowa/src/gplx/xowa/xtns/template_styles/Template_styles_nde_tst.java @@ -84,6 +84,17 @@ public class Template_styles_nde_tst { , fxt.Make__style(0, css) ); } + @Test public void Fix_single_word_paragraph() { // PURPOSE:make sure block is closed, else single-word paragraphs; ISSUE#:616; DATE:2019-11-18 + String css = fxt.Make__css_color("red"); + fxt.Init__page("Template:Test.css", css); + fxt.Parser_fxt().Init_para_y_(); + fxt.Test__parse + ( String_.Concat_lines_nl_skip_last("", "a") + , String_.Concat_lines_nl_skip_last("", "

a", "

") + , fxt.Make__style(0, css) + ); + fxt.Parser_fxt().Init_para_n_(); + } @Test public void Error__invalid_title() { fxt.Test__parse ( "" @@ -108,6 +119,7 @@ public class Template_styles_nde_tst { } class Template_styles_nde_fxt { private final Xop_fxt parser_fxt = new Xop_fxt(); + public Xop_fxt Parser_fxt() {return parser_fxt;} public void Reset() { parser_fxt.Reset(); parser_fxt.Wiki().Xtn_mgr().Init_by_wiki(parser_fxt.Wiki());