From 7344be69f91b126aca599321c8ba53d03be26d55 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Sun, 26 Jul 2026 14:25:54 -0500 Subject: [PATCH 1/2] Test make pgtle PGTLE_VERSION=X limiting output (pgxntool#65) Add tests/updates for pgxntool commit a3c0b02 (fix `make pgtle PGTLE_VERSION=X` being ignored): - base.mk's pgtle target now forwards PGTLE_VERSION through to pgtle.sh's --pgtle-version flag instead of silently ignoring it Add a BATS test in test/sequential/04-pgtle.bats asserting that `make pgtle PGTLE_VERSION=1.5.0+` generates only the requested version range's output file, and clarify the neighboring test's stale comment now that the Makefile path is also covered. Co-Authored-By: Claude --- test/sequential/04-pgtle.bats | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/sequential/04-pgtle.bats b/test/sequential/04-pgtle.bats index 2287524..5a5c8ee 100644 --- a/test/sequential/04-pgtle.bats +++ b/test/sequential/04-pgtle.bats @@ -52,9 +52,25 @@ teardown_file() { [ -f "pg_tle/1.5.0+/pgxntool-test.sql" ] } +@test "pgtle: make pgtle PGTLE_VERSION=X limits output to specific version (issue #65)" { + # base.mk's pgtle target must forward the PGTLE_VERSION make variable + # through to pgtle.sh's --pgtle-version flag. It previously did not, + # so `make pgtle PGTLE_VERSION=1.5.0+` silently generated all three + # version ranges instead of just the requested one. + run rm -rf pg_tle + assert_success + + run make pgtle PGTLE_VERSION=1.5.0+ + assert_success + + [ -f "pg_tle/1.5.0+/pgxntool-test.sql" ] + [ ! -f "pg_tle/1.0.0-1.4.0/pgxntool-test.sql" ] + [ ! -f "pg_tle/1.4.0-1.5.0/pgxntool-test.sql" ] +} + @test "pgtle: --pgtle-version limits output to specific version" { - # Note: The Makefile always generates all versions. This test verifies - # that the script's --pgtle-version flag works correctly when called directly. + # Verifies the script's --pgtle-version flag works correctly when called + # directly (independent of the Makefile's PGTLE_VERSION wiring above). run rm -rf pg_tle assert_success From 8ff3532352d90409e8344f078c883efff8b76d5c Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Sun, 26 Jul 2026 15:55:39 -0500 Subject: [PATCH 2/2] Fix confusing wording in new pgtle test name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit s/specific/specified/ — "specified version" more clearly refers to the version passed via PGTLE_VERSION=X, per review feedback on PR #32. Co-Authored-By: Claude --- test/sequential/04-pgtle.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sequential/04-pgtle.bats b/test/sequential/04-pgtle.bats index 5a5c8ee..05fdb51 100644 --- a/test/sequential/04-pgtle.bats +++ b/test/sequential/04-pgtle.bats @@ -52,7 +52,7 @@ teardown_file() { [ -f "pg_tle/1.5.0+/pgxntool-test.sql" ] } -@test "pgtle: make pgtle PGTLE_VERSION=X limits output to specific version (issue #65)" { +@test "pgtle: make pgtle PGTLE_VERSION=X limits output to specified version (issue #65)" { # base.mk's pgtle target must forward the PGTLE_VERSION make variable # through to pgtle.sh's --pgtle-version flag. It previously did not, # so `make pgtle PGTLE_VERSION=1.5.0+` silently generated all three