File: 01_clickable.t

package info (click to toggle)
libtemplate-plugin-clickable-perl 0.05-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 56 kB
  • ctags: 7
  • sloc: makefile: 42; perl: 38
file content (23 lines) | stat: -rw-r--r-- 606 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use Template::Test;

test_expect(\*DATA);

__END__
--test--
[% USE Clickable -%]
[% FILTER clickable -%]
http://www.template-toolkit.org/
[%- END %]
--expect--
<a href="http://www.template-toolkit.org/">http://www.template-toolkit.org/</a>

--test--
[% USE Clickable -%]
[% FILTER clickable target => '_blank' -%]
http://www.template-toolkit.org/
http://www.template-toolkit.org/
[%- END %]
--expect--
<a href="http://www.template-toolkit.org/" target="_blank">http://www.template-toolkit.org/</a>
<a href="http://www.template-toolkit.org/" target="_blank">http://www.template-toolkit.org/</a>