refactor the parsing of SQL files
[dbsrgits/DBIx-Class-DeploymentHandler.git] / t / 10-split-sql-chunk.t
diff --git a/t/10-split-sql-chunk.t b/t/10-split-sql-chunk.t
new file mode 100644 (file)
index 0000000..025e9fc
--- /dev/null
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+
+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
+