Robustify the tests a little.
[dbsrgits/SQL-Translator.git] / t / 02mysql-parser.t
index 56609bf..3aa829a 100644 (file)
@@ -4,11 +4,21 @@
 
 use strict;
 
-use Test::More tests => 180;
+use Test::More;
 use SQL::Translator;
-use SQL::Translator::Parser::MySQL qw(parse);
 use SQL::Translator::Schema::Constants;
 
+eval {
+    require SQL::Translator::Parser::MySQL;
+    SQL::Translator::Parser::MySQL->import('parse');
+};
+if ($@) {
+    plan skip_all => "$@";
+}
+else {
+    plan tests => 180;
+}
+
 {
     my $tr = SQL::Translator->new;
     my $data = q|create table sessions (