aboutsummaryrefslogtreecommitdiff
path: root/src/test/modules/test_json_parser/t/003_test_semantic.pl
blob: e6eb7c2fcc27b4c653b7bd7217f60944ebc14aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use strict;
use warnings;

use PostgreSQL::Test::Utils;
use Test::More;
use FindBin;

use File::Temp qw(tempfile);

my $test_file = "$FindBin::RealBin/../tiny.json";
my $test_out = "$FindBin::RealBin/../tiny.out";

my $exe = "test_json_parser_incremental";

my ($stdout, $stderr) = run_command( [$exe, "-s", $test_file] );

is($stderr, "", "no error output");

my ($fh, $fname) = tempfile();

print $fh $stdout,"\n";

close($fh);

($stdout, $stderr) = run_command(["diff", "-u", $fname, $test_out]);

is($stdout, "", "no output diff");
is($stderr, "", "no diff error");

done_testing();