1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/usr/bin/env perl
use strict;
use warnings;
use SQL::SplitStatement;
use Test::More;
BEGIN {
unless ( eval 'use Test::Exception; 1' ) {
plan skip_all => "please install Test::Exception to run these tests"
}
}
plan tests => 3;
throws_ok {
my $sql_splitter = SQL::SplitStatement->new({
keep_terminator => 1,
keep_terminators => 1
})
} qr/can't be both assigned/,
'keep_terminator and keep_terminators both assigned';
lives_ok {
my $sql_splitter = SQL::SplitStatement->new({
keep_terminator => 1
})
}
'keep_terminator only';
lives_ok {
my $sql_splitter = SQL::SplitStatement->new({
keep_terminators => 1
})
}
'keep_terminators only';
|