File: 06_v2.05.t

package info (click to toggle)
libhtml-fromtext-perl 2.07-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 220 kB
  • sloc: perl: 430; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use Test::More qw[no_plan];

use_ok 'HTML::FromText';

my $html = text2html( <<'__TEXT__', paras => 1, blockcode => 1 );
  my $who = "World";

  print "Hello, $who!\n";
__TEXT__
cmp_ok( $html, 'eq', <<'__HTML__', 'blockcode consolidated' );
<blockquote class="hft-blockcode"><pre>my $who = &quot;World&quot;;

print &quot;Hello, $who!\n&quot;;</pre></blockquote>
__HTML__

$html = text2html( <<'__TEXT__', paras => 1, blockparas => 1 );
  Hello

  World
__TEXT__
cmp_ok( $html, 'eq', <<'__HTML__', 'blockparas consolidated' );
<blockquote class="hft-blockparas"><p>Hello</p>

<p>World</p></blockquote>
__HTML__