TAP test utility module 'PG_LSN.pm' - Mailing list pgsql-hackers

From Craig Ringer
Subject TAP test utility module 'PG_LSN.pm'
Date
Msg-id CAGRY4nzBk-vugFyJpLOmwXzbq5MTEQk-+EkzE4=rrUhLTH6ESA@mail.gmail.com
Whole thread Raw
Responses Re: TAP test utility module 'PG_LSN.pm'
List pgsql-hackers
Hi all

I'd like to share the attached PG_LSN.pm module that I use when
writing TAP tests. I suggest that it be considered for inclusion in
core.

It defines a Perl datatype PG_LSN with operator support, so you can
write things like

    cmp_ok($got_lsn, "<", $expected_lsn, "testname")

in TAP tests and get sensible results without any concern for LSN
representation details, locale, etc. You can subtract LSNs to get a
byte difference too.

It's small but I've found it handy.

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Printing backtrace of postgres processes
Next
From: Thomas Munro
Date:
Subject: PG vs LLVM 12 on seawasp, next round