Almost-minimal filesystem based blog.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
539 B

#!/usr/bin/env perl
use strict;
use warnings;
use lib 'lib';
use Test::More tests => 2;
use App::WRT::HTML qw(:all);
my $a_tag = a('hi', {href => 'https://example.com/', title => 'example'});
# diag($a_tag);
is(
$a_tag,
'<a href="https://example.com/" title="example">hi</a>',
'got a tag with attributes'
);
my $small_tag = small('text', {title => '<thing with angle brackets>'});
# diag($small_tag);
is(
$small_tag,
'<small title="&lt;thing with angle brackets&gt;">text</small>',
'got a tag with escaped attributes'
);