Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
38e02ab
Testing something
lwasylow Mar 9, 2026
461ad5d
Another test
lwasylow Mar 9, 2026
44f5495
Test
lwasylow Mar 9, 2026
b5f2dc7
Thats funny:)
lwasylow Mar 9, 2026
0dd7dba
that is rubbish
lwasylow Mar 9, 2026
4ea0fcb
revert test
lwasylow Mar 9, 2026
17604d8
Small tweaks
lwasylow Mar 9, 2026
5869f32
one at the time
lwasylow Mar 9, 2026
3f8d2cf
Move out outside
lwasylow Mar 9, 2026
37fae24
fix invalid locator
lwasylow Mar 9, 2026
5189955
revert
lwasylow Mar 9, 2026
5a21774
Changing a code to validate by lines instead of clobs for performance.
lwasylow Mar 14, 2026
39f5d64
Fixing loop syntax
lwasylow Mar 14, 2026
93ffb72
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow Mar 14, 2026
393cfec
Update code
lwasylow Mar 15, 2026
8d794f0
Update block
lwasylow Mar 15, 2026
a32e09d
Small fixes
lwasylow Mar 15, 2026
b2e914f
Update comment
lwasylow Mar 15, 2026
66de806
Introduce global variable
lwasylow Mar 15, 2026
f82a3b5
Cleanup
lwasylow Mar 15, 2026
934df67
Optimization fiurther
lwasylow Mar 15, 2026
65145c2
Trim spaces
lwasylow Mar 15, 2026
8105179
Added extra tests.
lwasylow Mar 15, 2026
cc491cf
Enhance annotation parser with new tests and source line handling fun…
lwasylow Mar 15, 2026
6717ad3
Add tests for Windows-style newlines and long procedure names in anno…
lwasylow Mar 15, 2026
6c513be
Fix regex extraction for procedure/function names and ensure ordered …
lwasylow Mar 15, 2026
46f3d12
Update tests
lwasylow Mar 15, 2026
81e1752
Refactor annotation parser tests and utility functions
lwasylow Mar 16, 2026
fecbcc1
Remove redundant parse_object_annotations function overloads and upda…
lwasylow Mar 16, 2026
2547b40
Update code to avoid
lwasylow Mar 17, 2026
40eb166
Enhance annotation processing by improving SQL text handling and addi…
lwasylow Mar 17, 2026
1cdeb9c
Refactor annotation processing and enhance line scanning functionalit…
lwasylow Mar 18, 2026
c4d0ab0
Remove redundant exception handling in build_annot_cache_for_sources …
lwasylow Mar 18, 2026
aa3bfe7
Refactor annotation patterns in ut_annotation_parser and remove unuse…
lwasylow Mar 18, 2026
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
Prev Previous commit
Next Next commit
Add tests for Windows-style newlines and long procedure names in anno…
…tation parser
  • Loading branch information
lwasylow committed Mar 15, 2026
commit 6717ad3d645498481c117c97097f406acd5032ca
60 changes: 60 additions & 0 deletions test/ut3_tester/core/annotations/test_annotation_parser.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -859,5 +859,65 @@ END;';
ut.expect(l_result(1)).to_equal('v := ''a/b''; -- this is /* not */ a ml comment' || chr(10));
end;

procedure test_windows_newline_lines
as
l_source dbms_preprocessor.source_lines_t;
l_actual ut3_develop.ut_annotations;
l_expected ut3_develop.ut_annotations;
begin
--Arrange
l_source := make_source(ut_varchar2_list(
'PACKAGE test_tt AS' || chr(10),
' -- %suite' || chr(10),
' -- %displayname(Name of suite)' || chr(13) || chr(10),
' -- %suitepath(all.globaltests)' || chr(10),
' END;' || chr(10)
));

--Act
l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source, 'PACKAGE');

--Assert
l_expected := ut3_develop.ut_annotations(
ut3_develop.ut_annotation( 2, 'suite', null, null ),
ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ),
ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null )
);

ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected));
end;

procedure test_annot_very_long_name_lines
as
l_source dbms_preprocessor.source_lines_t;
l_actual ut3_develop.ut_annotations;
l_expected ut3_develop.ut_annotations;
begin
--Arrange
l_source := make_source(ut_varchar2_list(
'PACKAGE very_long_procedure_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_did_it AS' || chr(10),
' -- %suite' || chr(10),
' -- %displayname(Name of suite)' || chr(10),
' -- %suitepath(all.globaltests)' || chr(10),
'' || chr(10),
' --%test' || chr(10),
' procedure very_long_procedure_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_dit_it;' || chr(10),
' END;' || chr(10)
));

--Act
l_actual := ut3_develop.ut_annotation_parser.parse_object_annotations(l_source, 'PACKAGE');

--Assert
l_expected := ut3_develop.ut_annotations(
ut3_develop.ut_annotation( 2, 'suite', null, null ),
ut3_develop.ut_annotation( 3, 'displayname', 'Name of suite', null ),
ut3_develop.ut_annotation( 4, 'suitepath', 'all.globaltests', null ),
ut3_develop.ut_annotation( 6, 'test', null, 'very_long_procedure_name_valid_for_oracle_12_so_utPLSQL_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_dit_it' )
);

ut.expect(anydata.convertCollection(l_actual)).to_equal(anydata.convertCollection(l_expected));
end;

end test_annotation_parser;
/
5 changes: 5 additions & 0 deletions test/ut3_tester/core/annotations/test_annotation_parser.pks
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ create or replace package test_annotation_parser is
procedure test_rmc_multiple_ml_comments_one_line;
-- %test(comment markers after string with slash handled correctly)
procedure test_rmc_comment_after_string_with_slash;
--%test(Parses source-code with Windows-style newline using source lines overload)
procedure test_windows_newline_lines;
--%test(parse annotations with very long procedure name using source lines overload)
procedure test_annot_very_long_name_lines;


end test_annotation_parser;
/
Loading