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

Skip to content

Commit 75f69e1

Browse files
committed
Merge branch 'develop' of github.com:lwasylow/utPLSQL into fix/catercddata
2 parents d1dc6e1 + d9f09f0 commit 75f69e1

4 files changed

Lines changed: 39 additions & 4 deletions

File tree

source/core/ut_suite_builder.pkb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ create or replace package body ut_suite_builder is
105105
l_annotation_pos binary_integer;
106106
begin
107107
l_result.owner := a_object.object_owner;
108-
l_result.name := a_object.object_name;
108+
l_result.name := lower(trim(a_object.object_name));
109109
l_annotation_no := a_object.annotations.first;
110110
while l_annotation_no is not null loop
111111
l_annotation_pos := a_object.annotations(l_annotation_no).position;
112112
if a_object.annotations(l_annotation_no).subobject_name is null then
113113
l_result.annotations(l_annotation_pos).name := a_object.annotations(l_annotation_no).name;
114114
l_result.annotations(l_annotation_pos).text := a_object.annotations(l_annotation_no).text;
115115
else
116-
l_result.annotations(l_annotation_pos).procedure_name := a_object.annotations(l_annotation_no).subobject_name;
116+
l_result.annotations(l_annotation_pos).procedure_name := lower(trim(a_object.annotations(l_annotation_no).subobject_name));
117117
l_result.annotations(l_annotation_pos).procedure_annotations := get_procedure_annotations(a_object.annotations, l_annotation_no);
118118
end if;
119119
l_annotation_no := a_object.annotations.next(l_annotation_no);

source/core/ut_utils.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ create or replace package ut_utils authid definer is
2121
*
2222
*/
2323

24-
gc_version constant varchar2(50) := 'v3.1.2.1883-develop';
24+
gc_version constant varchar2(50) := 'v3.1.2.1894-develop';
2525

2626
/* Constants: Event names */
2727
subtype t_event_name is varchar2(30);

test/core/reporters/test_junit_reporter.pkb

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,18 @@ create or replace package body test_junit_reporter as
6161
execute immediate q'[create or replace package body tst_package_junit_nosuite as
6262
procedure test1 is begin ut.expect(1).to_equal(1); end;
6363
end;]';
64+
65+
execute immediate q'[create or replace package Tst_Fix_Case_Sensitive as
66+
--%suite
67+
68+
--%test(bugfix)
69+
procedure bUgFiX;
70+
end;]';
6471

72+
execute immediate q'[create or replace package body Tst_Fix_Case_Sensitive as
73+
procedure bUgFiX is begin ut.expect(1).to_equal(1); end;
74+
end;]';
75+
6576
execute immediate q'[create or replace package check_fail_escape is
6677
--%suitepath(core)
6778
--%suite(checkfailedescape)
@@ -284,7 +295,6 @@ create or replace package body test_junit_reporter as
284295
ut.expect(l_actual).to_be_like(l_expected);
285296
end;
286297

287-
288298
procedure check_failure_escaped is
289299
l_results ut3.ut_varchar2_list;
290300
l_actual clob;
@@ -300,6 +310,27 @@ Actual: 'test' (varchar2) was expected to equal: '<![CDATA[som
300310
]]>%');
301311
end;
302312

313+
procedure check_classname_is_populated is
314+
l_results ut3.ut_varchar2_list;
315+
l_actual clob;
316+
l_expected varchar2(32767):= q'[<testsuites tests="1" disabled="0" errors="0" failures="0" name="" time="%" >
317+
<testsuite tests="1" id="1" package="tst_fix_case_sensitive" disabled="0" errors="0" failures="0" name="tst_fix_case_sensitive" time="%" >
318+
<testcase classname="tst_fix_case_sensitive" assertions="0" name="bugfix" time="%" >
319+
<system-out/>
320+
<system-err/>
321+
</testcase>
322+
<system-out/>
323+
<system-err/>
324+
</testsuite>
325+
</testsuites>]';
326+
begin
327+
select *
328+
bulk collect into l_results
329+
from table(ut3.ut.run('Tst_Fix_Case_Sensitive',ut3.ut_junit_reporter()));
330+
l_actual := ut3.ut_utils.table_to_clob(l_results);
331+
ut.expect(l_actual).to_be_like(l_expected);
332+
end;
333+
303334
procedure remove_test_package is
304335
pragma autonomous_transaction;
305336
begin
@@ -308,6 +339,7 @@ Actual: &apos;test&apos; (varchar2) was expected to equal: &apos;&lt;![CDATA[som
308339
execute immediate 'drop package tst_package_junit_nodesc';
309340
execute immediate 'drop package tst_package_junit_nosuite';
310341
execute immediate 'drop package check_fail_escape';
342+
execute immediate 'drop package Tst_Fix_Case_Sensitive';
311343
reporters.reporters_cleanup;
312344
end;
313345
end;

test/core/reporters/test_junit_reporter.pks

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ create or replace package test_junit_reporter as
3535

3636
--%test(Report produces expected output)
3737
procedure reporort_produces_expected_out;
38+
39+
--%test( Check classname is populated when procedure is mixed cased - bug #659)
40+
procedure check_classname_is_populated;
3841

3942
--%test( Validate that fail with special char are escaped )
4043
procedure check_failure_escaped;

0 commit comments

Comments
 (0)