Commit f994809a authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Scenario: Adding test for scenario compilation.

parent dce2de37
......@@ -33,6 +33,7 @@ check_SCRIPTS = \
t/Regexps.t \
t/compile_modules.t \
t/compile_executables.t \
t/compile_scenarios.t \
t/Database_LDAP.t \
t/parse_templates.t \
t/pod-syntax.t \
......
#-*- perl -*-
use strict;
use warnings;
use English qw(-no_match_vars);
use Test::More;
use Sympa::Scenario;
my @files = <default/scenari/*.*>;
foreach my $file (@files) {
open my $fh, '<', $file or die $ERRNO;
my $data = do {local $RS; <$fh>};
close $fh;
my $parsed = Sympa::Scenario::compile('*', $data);
my $eval_error = $EVAL_ERROR;
ok(($parsed and ref $parsed->{sub} eq 'CODE'), $file);
diag($eval_error) if $eval_error;
}
done_testing();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment