Commit | Line | Data |
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 | |
10 | use Symbol; |
11 | use Data::Dumper; |
12 | use SQL::Translator::Parser::MySQL qw(parse); |
13 | |
14 | my $datafile = "t/data/mysql/Apache-Session-MySQL.sql"; |
15 | my $data; |
16 | my $fh = gensym; |
17 | |
18 | open $fh, $datafile or die "Can't open '$datafile' for reading: $!"; |
19 | read($fh, $data, -s $datafile); |
20 | close $fh or die "Can't close '$datafile': $!"; |
21 | |
22 | BEGIN { print "1..1\n"; } |
23 | |
24 | eval { parse($data); }; |
25 | |
26 | print "not " if $@; |
27 | print "ok 1\n"; |