Skip to content
Browse files

Test Str and ArrayRef input for SQLT->filename

  • Loading branch information...
1 parent 62d2a1c commit 49c1f684968755679d73ae98bf57f701a2f5d8da @mateu mateu committed with frioux Oct 9, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 t/74-filename-arrayref.t
View
16 t/74-filename-arrayref.t
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+# vim: set ft=perl:
+#
+# Test that the filename can be set with an ArrayRef as well as a Str.
+#
+
+use strict;
+
+use SQL::Translator;
+use Test::More tests => 2;
+
+my $datafile = "t/data/mysql/Apache-Session-MySQL.sql";
+my $tr0 = SQL::Translator->new(filename => $datafile);
+my $tr1 = SQL::Translator->new(filename => [$datafile]);
+ok($tr0, "filename takes a Str");
+ok($tr1, "filename takes an ArrayRef");

0 comments on commit 49c1f68

Please sign in to comment.
Something went wrong with that request. Please try again.