From 49c1f684968755679d73ae98bf57f701a2f5d8da Mon Sep 17 00:00:00 2001 From: Mateu X Hunter Date: Tue, 9 Oct 2012 15:20:02 -0600 Subject: [PATCH] Test Str and ArrayRef input for SQLT->filename --- t/74-filename-arrayref.t | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 t/74-filename-arrayref.t diff --git a/t/74-filename-arrayref.t b/t/74-filename-arrayref.t new file mode 100644 index 000000000..e07672b69 --- /dev/null +++ b/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");