add link wrapping block test
authorAdrian Oldham <adriann@visualthought.com.au>
Thu, 24 Oct 2013 00:53:26 +0000 (11:53 +1100)
committerTony Cook <tony@develop-help.com>
Sun, 3 Nov 2013 23:20:22 +0000 (10:20 +1100)
t/010-modules/050-format.t

index 944b8c666ed67d0cb86bb402d7f4b26b88a767c5..f0316afe9fa469b9b9276967bc3b08711bcec47f 100644 (file)
@@ -1,6 +1,6 @@
 #!perl -w
 use strict;
-use Test::More tests => 137;
+use Test::More tests => 138;
 
 sub format_test($$$;$);
 sub noformat_test($$$;$);
@@ -550,7 +550,7 @@ EOS
 EOS
 
   format_test "abc comment[foo] def", "<p>abc  def</p>", "comment";
-  format_test  <<IN, <<OUT, 'link over paras following an hr', 'both';
+  format_test <<IN, <<OUT, 'link over paras following an hr', 'both';
 hr[100%]
 
 link[#foo|hello
@@ -569,6 +569,26 @@ IN
 <a href="#foo"><p>hello</p>
 <p>world</p>
 </a>
+OUT
+
+format_test <<IN, <<OUT, 'link over div block containing paras', 'both';
+link[#foo|
+
+div[#id class background-color: red;|
+
+hello
+
+world
+
+]
+]
+IN
+<a href="#foo">
+<div id="id" style="background-color: red;" class="class">
+<p>hello</p>
+<p>world</p>
+</div>
+</a>
 OUT
 
   # remove_format() tests