Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions test/corpus/watcom/metadata-inline-header-boundary.expected.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE PROCEDURE "fct"."metadata_boundary"()
-- METADATA
-- Description : Keeps CREATE PROCEDURE text in metadata comments untouched.
-- Version : 1.0
-- Author : Test Author
-- Updated By : Test Author
-- Created : 2026-06-10
-- Updated : 2026-06-10
-- History :
-- v1.0: Initial creation mentions SELECT FROM WHERE - 2026-06-10 Test Author
-- METADATA END
BEGIN
SELECT 'CREATE PROCEDURE dbo.fake_object() should stay literal' AS description;
-- CREATE FUNCTION dbo.fake_comment() should stay comment text
END;
15 changes: 15 additions & 0 deletions test/corpus/watcom/metadata-inline-header-boundary.input.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
create procedure "fct"."metadata_boundary"()
-- METADATA
-- Description : Keeps CREATE PROCEDURE text in metadata comments untouched.
-- Version : 1.0
-- Author : Test Author
-- Updated By : Test Author
-- Created : 2026-06-10
-- Updated : 2026-06-10
-- History :
-- v1.0: Initial creation mentions SELECT FROM WHERE - 2026-06-10 Test Author
-- METADATA END
begin
select 'CREATE PROCEDURE dbo.fake_object() should stay literal' as description;
-- CREATE FUNCTION dbo.fake_comment() should stay comment text
end;
30 changes: 30 additions & 0 deletions test/corpus/watcom/metadata-multiple-headers-boundary.expected.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-- CREATE PROCEDURE dbo.comment_decoy() should not affect metadata boundaries
CREATE PROCEDURE dbo.first_metadata_boundary()
-- METADATA
-- Description : First object header mentions CREATE FUNCTION as prose.
-- Version : 1.0
-- Author : First Author
-- Updated By : First Author
-- Created : 2026-06-10
-- Updated : 2026-06-10
-- History :
-- v1.0: Created before the second metadata header - 2026-06-10 First Author
-- METADATA END
BEGIN
SELECT 1;
END;

CREATE FUNCTION dbo.second_metadata_boundary() RETURNS integer
-- METADATA
-- Description : Second object header mentions CREATE TRIGGER as prose.
-- Version : 1.0
-- Author : Second Author
-- Updated By : Second Author
-- Created : 2026-06-10
-- Updated : 2026-06-10
-- History :
-- v1.0: Created after the first metadata header - 2026-06-10 Second Author
-- METADATA END
BEGIN
RETURN 2;
END;
30 changes: 30 additions & 0 deletions test/corpus/watcom/metadata-multiple-headers-boundary.input.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-- CREATE PROCEDURE dbo.comment_decoy() should not affect metadata boundaries
create procedure dbo.first_metadata_boundary()
-- METADATA
-- Description : First object header mentions CREATE FUNCTION as prose.
-- Version : 1.0
-- Author : First Author
-- Updated By : First Author
-- Created : 2026-06-10
-- Updated : 2026-06-10
-- History :
-- v1.0: Created before the second metadata header - 2026-06-10 First Author
-- METADATA END
begin
select 1;
end;

create function dbo.second_metadata_boundary() returns integer
-- METADATA
-- Description : Second object header mentions CREATE TRIGGER as prose.
-- Version : 1.0
-- Author : Second Author
-- Updated By : Second Author
-- Created : 2026-06-10
-- Updated : 2026-06-10
-- History :
-- v1.0: Created after the first metadata header - 2026-06-10 Second Author
-- METADATA END
begin
return 2;
end;
Loading