Unverified Commit ed2c0831 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #782 from ikedas/scenario_compilation by ikedas

Enhancements on scenarios
parents 8f508542 6ac59b9c
......@@ -12,7 +12,7 @@
- ./configure
- cd src; make; cd ..
- make check-local TEST_FILES='xt/perltidy.t' || true
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/parse_templates.t t/pod-syntax.t'
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/compile_scenarios.t t/parse_templates.t t/pod-syntax.t'
- coverage-report
- make clean
......
......@@ -43,7 +43,7 @@ script:
- ./configure
- cd src; make; cd ..
- make check-local TEST_FILES='xt/perltidy.t' || true
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/parse_templates.t t/pod-syntax.t'
- make check-local TEST_FILES='t/compile_executables.t t/compile_modules.t t/Language.t t/compile_scenarios.t t/parse_templates.t t/pod-syntax.t'
after_success:
- coverage-report
......
......@@ -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 \
......
......@@ -315,6 +315,13 @@ Subject: [%"Failed to parse web template"|loc|qencode%]
[%|loc(param0)%]Error: %1[%END%]
[%|loc%]Check the Sympa log files for more information.[%END%]
[% ELSIF type == 'error_performing_condition' -%]
Subject: [%"Failed to perform scenario condition"|loc|qencode%]
[%|loc%]Sympa failed to perform scenario condigion for the following reason: [%END%]
[%|loc(error)%]Error: %1[%END%]
[%|loc%]Check the Sympa log files for more information.[%END%]
[%# INTERNAL SERVER ERROR : MAIL -%]
[% ELSIF type == 'mail_intern_error' -%]
Subject: [%"Listmaster: internal server error"|loc|qencode%]
......
......@@ -10182,7 +10182,7 @@ sub do_scenario_test {
 
my $result = Sympa::Scenario->new($robot, $function)->authz(
$in{'auth_method'},
{ 'listname' => $in{'listname'},
{ 'listname' => $in{'listname'}, # FIXME: Unavailable list
'sender' => $in{'sender'},
'email' => $in{'email'},
'remote_host' => $in{'remote_host'},
......
This diff is collapsed.
#-*- 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