xref: /third_party/openssl/external/perl/Text-Template-1.56/t/inline-comment.t (revision e1051a39)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/openssl/external/perl/Text-Template-1.56/t/
1e1051a39Sopenharmony_ci#!perl
2e1051a39Sopenharmony_ci#
3e1051a39Sopenharmony_ci# Test for comments within an inline code block
4e1051a39Sopenharmony_ci
5e1051a39Sopenharmony_ciuse strict;
6e1051a39Sopenharmony_ciuse warnings;
7e1051a39Sopenharmony_ciuse Test::More tests => 2;
8e1051a39Sopenharmony_ci
9e1051a39Sopenharmony_ciuse_ok 'Text::Template' or exit 1;
10e1051a39Sopenharmony_ci
11e1051a39Sopenharmony_cimy $tmpl = Text::Template->new(
12e1051a39Sopenharmony_ci    TYPE => 'STRING',
13e1051a39Sopenharmony_ci    SOURCE => "Hello {\$name#comment}");
14e1051a39Sopenharmony_ci
15e1051a39Sopenharmony_cimy $vars = { name => 'Bob' };
16e1051a39Sopenharmony_ci
17e1051a39Sopenharmony_ciis $tmpl->fill_in(HASH => $vars), 'Hello Bob';
18

Indexes created Thu Nov 07 10:32:03 CST 2024