diff options
author | cvs2git <cvs2git> | 2009-12-31 13:16:42 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2009-12-31 13:16:42 +0000 |
commit | 36c9e61195cb2cf28dcc3913cdfe4f565a6c836a (patch) | |
tree | 2a37ea5e5f696e00093e97f30720c181e79afbe8 /rt/lib/t/regression/00-mason-syntax.t | |
parent | b4b0c7e72d7eaee2fbfc7022022c9698323203dd (diff) |
This commit was manufactured by cvs2svn to create tag 'RT_3_8_7'.RT_3_8_7
Diffstat (limited to 'rt/lib/t/regression/00-mason-syntax.t')
-rw-r--r-- | rt/lib/t/regression/00-mason-syntax.t | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/rt/lib/t/regression/00-mason-syntax.t b/rt/lib/t/regression/00-mason-syntax.t deleted file mode 100644 index ce692a3..0000000 --- a/rt/lib/t/regression/00-mason-syntax.t +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Test::More tests => 1; - -my $ok = 1; - -use File::Find; -find( { - no_chdir => 1, - wanted => sub { - return if /\.(?:jpe?g|png|gif|rej|\~)$/i; - return unless -f $_; - diag "testing $_" if $ENV{'TEST_VERBOSE'}; - eval { compile_file($_) } and return; - $ok = 0; - diag "error in ${File::Find::name}:\n$@"; - }, -}, 'html'); -ok($ok, "mason syntax is ok"); - -use HTML::Mason; -use HTML::Mason::Compiler; -use HTML::Mason::Compiler::ToObject; - -sub compile_file { - my $file = shift; - - open my $fh, '<:utf8', $file or die "couldn't open '$file': $!"; - my $text = do { local $/; <$fh> }; - close $fh or die "couldn't close '$file': $!"; - - my $compiler = new HTML::Mason::Compiler::ToObject; - $compiler->compile( - comp_source => $text, - name => 'my', - $HTML::Mason::VERSION >= 1.36? (comp_path => 'my'): (), - ); - return 1; -} - |