xref: /freebsd/crypto/openssl/external/perl/Text-Template-1.56/t/inline-comment.t (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1#!perl
2#
3# Test for comments within an inline code block
4
5use strict;
6use warnings;
7use Test::More tests => 2;
8
9use_ok 'Text::Template' or exit 1;
10
11my $tmpl = Text::Template->new(
12    TYPE => 'STRING',
13    SOURCE => "Hello {\$name#comment}");
14
15my $vars = { name => 'Bob' };
16
17is $tmpl->fill_in(HASH => $vars), 'Hello Bob';
18