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