pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15267: just for test
3+ messages / 2 participants
[nested] [flat]

* BUG #15267: just for test
@ 2018-07-08 01:15 PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 3+ messages in thread

From: PG Bug reporting form @ 2018-07-08 01:15 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: sipan477@gmail.com

The following bug has been logged on the website:

Bug reference:      15267
Logged by:          Sipan Slivany
Email address:      sipan477@gmail.com
PostgreSQL version: 11beta2
Operating system:   windows 64 bit
Description:        

just for test



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* [PATCH v5 2/2] Use Test::Differences if available
@ 2022-06-15 17:42 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alvaro Herrera @ 2022-06-15 17:42 UTC (permalink / raw)

---
 src/test/modules/libpq_pipeline/README              |  3 +++
 .../modules/libpq_pipeline/t/001_libpq_pipeline.pl  | 13 ++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

inline patch 1: src/test/modules/libpq_pipeline/README, src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl (+15/-1 lines) download inline-1.patchdiff --git a/src/test/modules/libpq_pipeline/README b/src/test/modules/libpq_pipeline/README index d8174dd579..59c6ea8109 100644 --- a/src/test/modules/libpq_pipeline/README +++ b/src/test/modules/libpq_pipeline/README @@ -1 +1,4 @@ Test programs and libraries for libpq + +If you have Test::Differences installed, any differences in the trace files +are displayed in a format that's easier to read than the standard format. diff --git a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl index d8d496c995..49eec8a63a 100644 --- a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl +++ b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl @@ -9,6 +9,17 @@ use PostgresNode; use TestLib; use Test::More; +# Use Test::Differences if installed, and select unified diff output. +# No decent way to select a context line count with this; +# we could use a sub ref to allow that. +BEGIN +{ + if (!eval q{ use Test::Differences; unified_diff(); 1 }) + { + *eq_or_diff = \&is; + } +} + my $node = get_new_node('main'); $node->init; $node->start; @@ -54,7 +65,7 @@ for my $testname (@tests) $result = slurp_file_eval($traceout); next unless $result ne ""; - is($result, $expected, "$testname trace match"); + eq_or_diff($result, $expected, "$testname trace match"); } } -- 2.30.2
--igg5o36yau2li7um-- ^ permalink raw reply [nested|flat] 3+ messages in thread

* [PATCH v7 1/6] Use Test::Differences if available
@ 2022-06-15 17:42 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alvaro Herrera @ 2022-06-15 17:42 UTC (permalink / raw)

---
 src/test/modules/libpq_pipeline/README              |  3 +++
 .../modules/libpq_pipeline/t/001_libpq_pipeline.pl  | 13 ++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

inline patch 1: src/test/modules/libpq_pipeline/README, src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl (+15/-1 lines) download inline-1.patchdiff --git a/src/test/modules/libpq_pipeline/README b/src/test/modules/libpq_pipeline/README index d8174dd579..59c6ea8109 100644 --- a/src/test/modules/libpq_pipeline/README +++ b/src/test/modules/libpq_pipeline/README @@ -1 +1,4 @@ Test programs and libraries for libpq + +If you have Test::Differences installed, any differences in the trace files +are displayed in a format that's easier to read than the standard format. diff --git a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl index d8d496c995..49eec8a63a 100644 --- a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl +++ b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl @@ -9,6 +9,17 @@ use PostgresNode; use TestLib; use Test::More; +# Use Test::Differences if installed, and select unified diff output. +# No decent way to select a context line count with this; +# we could use a sub ref to allow that. +BEGIN +{ + if (!eval q{ use Test::Differences; unified_diff(); 1 }) + { + *eq_or_diff = \&is; + } +} + my $node = get_new_node('main'); $node->init; $node->start; @@ -54,7 +65,7 @@ for my $testname (@tests) $result = slurp_file_eval($traceout); next unless $result ne ""; - is($result, $expected, "$testname trace match"); + eq_or_diff($result, $expected, "$testname trace match"); } } -- 2.30.2
--c6botfw447u3lelj Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v7-0002-Allow-tracefile-to-be-stdout.patch" ^ permalink raw reply [nested|flat] 3+ messages in thread


end of thread, other threads:[~2022-06-15 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-08 01:15 BUG #15267: just for test PG Bug reporting form <noreply@postgresql.org>
2022-06-15 17:42 [PATCH v5 2/2] Use Test::Differences if available Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-06-15 17:42 [PATCH v7 1/6] Use Test::Differences if available Alvaro Herrera <alvherre@alvh.no-ip.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox