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

Skip to content

Commit 57902fc

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feature/using_released_to_test_develop
2 parents 8badb71 + a240b45 commit 57902fc

4 files changed

Lines changed: 46 additions & 2 deletions

File tree

docs/userguide/running-unit-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Executes single test procedure _hr.test_apply_bonus.bonus_cannot_be_negative_.
8282

8383
```sql
8484
begin
85-
ut.run(ut_varcahr2_list('hr.test_apply_bonus','cust'));
85+
ut.run(ut_varchar2_list('hr.test_apply_bonus','cust'));
8686
end;
8787
```
8888
Executes all tests from package _hr.test_apply_bonus_ and all tests from schema _cust_.

old_tests/RunAll.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ exec ut_coverage.coverage_start_develop();
5050
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParsePackageLevelAnnotationWithMultilineComment.sql
5151
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.spaceBeforeAnnotationParams.sql
5252
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParseAnnotationWithWindowsNewline.sql
53+
@@lib/RunTest.sql ut_annotations/ut_annotations.parse_package_annotations.ParseProcedureAnnotationWithVeryLongName.sql
5354
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTrace.sql
5455
@@lib/RunTest.sql ut_expectation_processor/who_called_expectation.parseStackTraceWith0x.sql
5556
@@ut_expectations/ut.expect.not_to_be_null.sql

source/core/ut_annotations.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ create or replace package ut_annotations authid current_user as
2424
*/
2525

2626
subtype t_annotation_name is varchar2(1000);
27-
subtype t_procedure_name is varchar2(30);
27+
subtype t_procedure_name is varchar2(250);
2828

2929
/*
3030
type: typ_annotation_param
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
PROMPT Parse PROCEDURE Annotation with very long name
2+
3+
--Arrange
4+
declare
5+
l_source clob;
6+
l_parsing_result ut_annotations.typ_annotated_package;
7+
l_expected ut_annotations.typ_annotated_package;
8+
l_ann_param ut_annotations.typ_annotation_param;
9+
10+
begin
11+
l_source := 'PACKAGE test_tt AS
12+
-- %suite
13+
-- %displayname(Name of suite)
14+
-- %suitepath(all.globaltests)
15+
16+
--%test
17+
procedure very_long_procedure_name_valid_for_oracle_12_so_utplsql_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_ditit;
18+
END;';
19+
20+
--Act
21+
l_parsing_result := ut_annotations.parse_package_annotations(l_source);
22+
23+
--Assert
24+
l_ann_param := null;
25+
l_ann_param.val := 'Name of suite';
26+
l_expected.package_annotations('suite').params := cast( null as ut_annotations.tt_annotation_params);
27+
l_expected.package_annotations('displayname').params(1) := l_ann_param;
28+
29+
l_ann_param := null;
30+
l_ann_param.val := 'all.globaltests';
31+
l_expected.package_annotations('suitepath').params(1) := l_ann_param;
32+
33+
l_expected.procedure_annotations(1).name := 'very_long_procedure_name_valid_for_oracle_12_so_utplsql_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_ditit';
34+
l_expected.procedure_annotations(1).annotations('test').params := cast( null as ut_annotations.tt_annotation_params);
35+
36+
check_annotation_parsing(l_expected, l_parsing_result);
37+
38+
if ut_expectation_processor.get_status = ut_utils.tr_success then
39+
:test_result := ut_utils.tr_success;
40+
end if;
41+
42+
end;
43+
/

0 commit comments

Comments
 (0)