Thanks to visit codestin.com
Credit goes to github.com

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
2 changes: 1 addition & 1 deletion source/core/ut_metadata.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ create or replace package body ut_metadata as
-- we fetch the source explicitly as dbms_preprocessor is very sow on 12.1 and 12.2 when grabbing the sources.
l_lines := sys.dbms_preprocessor.get_post_processed_source(l_lines);
for i in 1..l_lines.count loop
ut_utils.append_to_clob(l_source, l_lines(i));
ut_utils.append_to_clob(l_source, replace(l_lines(i), chr(13)||chr(10), chr(10)));
end loop;
return l_source;
end;
Expand Down
1 change: 1 addition & 0 deletions tests/RunAll.sql
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ exec ut_coverage.coverage_start_develop();
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParsePackageLevelAnnotationWithKeyValue.sql
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParsePackageLevelAnnotationWithMultilineComment.sql
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.spaceBeforeAnnotationParams.sql
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParseAnnotationWithWindowsNewline.sql
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTrace.sql
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTraceWith0x.sql
@@ut_expectations/ut.expect.not_to_be_null.sql
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
PROMPT Parse package level annotations with windows newline

--Arrange
declare
l_source clob;
l_parsing_result ut_annotations.typ_annotated_package;
l_expected ut_annotations.typ_annotated_package;
l_ann_param ut_annotations.typ_annotation_param;

begin
l_source := 'PACKAGE test_tt AS
-- %suite
-- %displayname(Name of suite)' || chr(13) || chr(10)
|| ' -- %suitepath(all.globaltests)
END;';

--Act
l_parsing_result := ut_annotations.parse_package_annotations(l_source);

--Assert
l_ann_param := null;
l_ann_param.val := 'Name of suite';
l_expected.package_annotations('suite').params := cast( null as ut_annotations.tt_annotation_params);
l_expected.package_annotations('displayname').params(1) := l_ann_param;

l_ann_param := null;
l_ann_param.val := 'all.globaltests';
l_expected.package_annotations('suitepath').params(1) := l_ann_param;

check_annotation_parsing(l_expected, l_parsing_result);

if ut_expectation_processor.get_status = ut_utils.tr_success then
:test_result := ut_utils.tr_success;
end if;

end;
/