Fixed a problem with the Macro config inserter.
Added a clause to SQL.t to force it to bail if the macro hasn't been temporarily added to the config.
This commit is contained in:
parent
d95fbffa39
commit
122b59019c
2 changed files with 5 additions and 1 deletions
|
|
@ -79,6 +79,10 @@ my $numTests = scalar @testSets;
|
|||
|
||||
plan tests => $numTests;
|
||||
|
||||
unless ($session->config->get('macros')->{'SQL'}) {
|
||||
BAIL_OUT('SQL macro not enabled');
|
||||
}
|
||||
|
||||
foreach my $testSet (@testSets) {
|
||||
my $output = sprintf $macroText, $testSet->{sql}, $testSet->{template};
|
||||
my $macro = $output;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package Macro_Config;
|
|||
|
||||
sub insert_macro {
|
||||
my ($session, $nickname, $macroName) = @_;
|
||||
my %macros = $session->config->get('macros');
|
||||
my %macros = %{ $session->config->get('macros') };
|
||||
$macros{$nickname} = $macroName;
|
||||
$session->config->{_config}->{'macros'} = \%macros;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue