Changed name of translate method to produce, to be consistant with Producer API....
[dbsrgits/SQL-Translator.git] / t / 02mysql-parser.t
CommitLineData
0494e672 1#!/usr/bin/perl
2# vim: set ft=perl:
3#
4# NOTE!!!!
5# For now, all this is testing is that Parse::RecDescent does not
6# die with an error! I am not verifying the validity of the data
7# returned here, just that the parser actually completed its parsing!
8#
9
10use Symbol;
11use Data::Dumper;
12use SQL::Translator::Parser::MySQL qw(parse);
13
14my $datafile = "t/data/mysql/Apache-Session-MySQL.sql";
15my $data;
16my $fh = gensym;
17
18open $fh, $datafile or die "Can't open '$datafile' for reading: $!";
19read($fh, $data, -s $datafile);
20close $fh or die "Can't close '$datafile': $!";
21
22BEGIN { print "1..1\n"; }
23
24eval { parse($data); };
25
26print "not " if $@;
27print "ok 1\n";