From 1a673f48c8ecc7731cd74db30dc8ef1b1a525517 Mon Sep 17 00:00:00 2001 From: Nicolas Steenlant Date: Thu, 31 Aug 2017 13:57:33 +0200 Subject: [PATCH] include_path option test --- META.json | 6 +++--- t/options.t | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/META.json b/META.json index 67cd1e4..17845db 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Nicolas Steenlant, C<< >>" ], "dynamic_config" : 0, - "generated_by" : "Dist::Milla version v1.0.18, Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Milla version v1.0.17, Dist::Zilla version 6.008, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], @@ -31,7 +31,7 @@ }, "develop" : { "requires" : { - "Dist::Milla" : "v1.0.18", + "Dist::Milla" : "v1.0.17", "Test::Pod" : "1.41" } }, @@ -70,6 +70,6 @@ "Patrick Hochstenbach ", "Vitali Peil " ], - "x_serialization_backend" : "Cpanel::JSON::XS version 3.0237" + "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233" } diff --git a/t/options.t b/t/options.t index 9496f03..6f90051 100644 --- a/t/options.t +++ b/t/options.t @@ -64,6 +64,27 @@ $exporter2 = Catmandu::Exporter::Template->new( end_tag => "%>" ); +ok $exporter->_tt != $exporter2->_tt, + 'tt engines with equal arguments get reused'; + +$exporter = Catmandu::Exporter::Template->new( + template => \$template, + INCLUDE_PATH => '/tmp/a', +); + +$exporter2 = Catmandu::Exporter::Template->new( + template => \$template, + INCLUDE_PATH => '/tmp/a', +); + +ok $exporter->_tt == $exporter2->_tt, + 'tt engines wirth equal arguments get reused'; + +$exporter2 = Catmandu::Exporter::Template->new( + template => \$template, + INCLUDE_PATH => '/tmp/b', +); + ok $exporter->_tt != $exporter2->_tt, 'tt engines wirth equal arguments get reused';