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