add link test over complex nested blocks
authorAdrian Oldham <adriann@visualthought.com.au>
Thu, 24 Oct 2013 02:40:24 +0000 (13:40 +1100)
committerTony Cook <tony@develop-help.com>
Sun, 3 Nov 2013 23:20:23 +0000 (10:20 +1100)
t/010-modules/050-format.t

index b9336ff..653b0d2 100644 (file)
@@ -1,6 +1,6 @@
 #!perl -w
 use strict;
-use Test::More tests => 139;
+use Test::More tests => 140;
 
 sub format_test($$$;$);
 sub noformat_test($$$;$);
@@ -616,6 +616,56 @@ IN
 </a>
 OUT
 
+format_test <<IN, <<OUT, 'link over complex nested block structure', 'both';
+
+link[http://www.example.com/|
+
+section[#id class background-color: red;|
+
+header[h1[headline
+
+more]
+
+]
+
+article[foo|
+
+b[bar|hello
+
+i[world
+
+today]]
+
+div[i[tomorrow]
+
+class[quux|yesterday]]
+
+]
+
+footer[#id|footer]
+
+]
+]
+IN
+<a href="http://www.example.com/">
+<section id="id" style="background-color: red;" class="class">
+<header>
+<h1>headline</h1>
+<h1>more</h1>
+</header>
+<article class="foo">
+<p><b class="bar">hello</b></p>
+<p><b class="bar"><i>world</i></b></p>
+<p><b class="bar"><i>today</i></b></p>
+<div>
+<p><i>tomorrow</i></p>
+<p class="quux">yesterday</p>
+</div>
+</article>
+<footer id="id">footer</footer>
+</section>
+</a>
+OUT
   # remove_format() tests
   noformat_test 'image[foo]', '', 'image';
   noformat_test 'code[something [bar]]', 'something [bar]', 'nested []';