File tree 2 files changed +17
-1
lines changed
src/test/modules/libpq_pipeline
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1
1
Test programs and libraries for libpq
2
+
3
+ If you have Test::Differences installed, any differences in the trace files
4
+ are displayed in a format that's easier to read than the standard format.
2
5
=====================================
3
6
4
7
This module was developed to test libpq's "pipeline" mode, but it can
Original file line number Diff line number Diff line change 8
8
use PostgreSQL::Test::Utils;
9
9
use Test::More;
10
10
11
+ # Use Test::Differences if installed, and select unified diff output.
12
+ # No decent way to select a context line count with this;
13
+ # we could use a sub ref to allow that.
14
+ BEGIN
15
+ {
16
+ # <<< protect next line from pgperltidy
17
+ if (!eval q{ use Test::Differences; unified_diff(); 1 } ) # # no critic (ProhibitStringyEval)
18
+ # >>>
19
+ {
20
+ *eq_or_diff = \&is;
21
+ }
22
+ }
23
+
11
24
my $node = PostgreSQL::Test::Cluster-> new(' main' );
12
25
$node -> init;
13
26
$node -> start;
55
68
$result = slurp_file_eval($traceout );
56
69
next unless $result ne " " ;
57
70
58
- is ($result , $expected , " $testname trace match" );
71
+ eq_or_diff ($result , $expected , " $testname trace match" );
59
72
}
60
73
}
61
74
You can’t perform that action at this time.
0 commit comments