switch replace to collect then emit, document that it isn't strictly required to...
[catagits/HTML-Zoom.git] / t / actions.t
index 625c48e..03082bf 100644 (file)
@@ -179,4 +179,21 @@ is(
   'collect w/inside collects correctly'
 );
 
+is(
+  run_for { $_->replace($ohai, { inside => 1 }) },
+  '<body>
+  <div class="main">O HAI</div>
+</body>
+',
+  'replace w/inside'
+);
+
+($expect = $tmpl) =~ s/(?=<\/div>)/O HAI/;
+
+is(
+  run_for { $_->append_inside($ohai) },
+  $expect,
+  'append inside ok'
+);
+
 done_testing;