From 0e2f86dba3fbb168a9ff649695779406f3d2df5f Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Sun, 10 Aug 2025 17:57:08 -0500 Subject: [PATCH] test: ensure dropped columns case is tested Ensure the `if (att->attisdropped)` branch is tested, by adding new columns in the fixtures and then dropping the with `ALTER TABLE projects DROP COLUMN project_name`. --- test/init.sql | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/init.sql b/test/init.sql index f813203..09a0c42 100644 --- a/test/init.sql +++ b/test/init.sql @@ -1,8 +1,14 @@ -CREATE TABLE projects ( - id integer, - name text, - client_id integer +CREATE TABLE projects +( id integer +, name text +, project_name text +, client_id integer +, subclient_id int ); +-- ensure these dropped column cases are tested +ALTER TABLE projects DROP COLUMN project_name; +ALTER TABLE projects DROP COLUMN subclient_id; + INSERT INTO projects VALUES (1, 'Windows 7', 1); INSERT INTO projects VALUES (2, 'has,comma', 1); INSERT INTO projects VALUES (NULL, NULL, NULL);