File: 10-split-sql-chunk.t

package info (click to toggle)
libdbix-class-deploymenthandler-perl 0.002218-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 464 kB
  • ctags: 149
  • sloc: perl: 3,253; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;

use Test::More;

use DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator;

*split_sql_chunk =
*DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::_split_sql_chunk;

is_deeply [ split_sql_chunk( <<'END' ) ], [ 'SELECT * FROM YADAH END' ];
BEGIN
    -- stuff
    SELECT * FROM YADAH
END;
END

is_deeply [ split_sql_chunk( 'foo', ' ', 'bar' ) ], [qw( foo bar)];

done_testing;