Just the fairy.
[dbsrgits/SQL-Translator.git] / t / 30sqlt-diff.t
CommitLineData
ed6f968a 1#!/usr/bin/perl
2# vim: set ft=perl:
3
4use strict;
5
6use File::Spec::Functions qw(catfile updir tmpdir);
ed6f968a 7use FindBin qw($Bin);
8use Test::More;
9
10my @script = qw(blib script sqlt-diff);
11my @create1 = qw(data sqlite create.sql);
12my @create2 = qw(data sqlite create2.sql);
13
14my $sqlt_diff = (-d "blib")
15 ? catfile($Bin, updir, @script)
16 : catfile($Bin, @script);
17
18my $create1 = (-d "t")
19 ? catfile($Bin, @create1)
20 : catfile($Bin, "t", @create1);
21
22my $create2 = (-d "t")
23 ? catfile($Bin, @create2)
24 : catfile($Bin, "t", @create2);
25
26plan tests => 2;
27
28ok(-e $sqlt_diff);
29my @cmd = ($sqlt_diff, "$create1=SQLite", "$create2=SQLite");
30
31close STDERR;
32my $out = `@cmd`;
33
34like($out, qr/ is missing field/, "Detected missing field 'lemon'");