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

Skip to content

Commit 160c3a8

Browse files
authored
Merge pull request #108 from GolezTrol/parse_suitepackages
parse suitepackages bug fix.
2 parents d86f594 + 03a5e87 commit 160c3a8

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

source/core/ut_suite_manager.pkb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ create or replace package body ut_suite_manager is
55

66
g_schema_suites tt_schena_suits_list;
77

8+
function trim_path(a_path varchar2, a_part varchar2) return varchar2 is
9+
begin
10+
return substr(a_path, nvl(length(a_part), 0) + 1);
11+
end;
12+
813
function config_package(a_owner_name varchar2, a_object_name varchar2) return ut_test_suite is
914
l_annotation_data ut_annotations.typ_annotated_package;
1015
l_suite_name ut_annotations.t_annotation_name;
@@ -153,7 +158,6 @@ create or replace package body ut_suite_manager is
153158

154159
procedure config_schema(a_owner_name varchar2) is
155160
l_suite ut_test_suite;
156-
l_suite_path varchar2(4000);
157161

158162
l_all_suites tt_schema_suits;
159163
l_ind varchar2(4000 char);
@@ -181,7 +185,7 @@ create or replace package body ut_suite_manager is
181185
l_cur_item := treat(a_root_suite.items(l_ind) as ut_test_suite);
182186
end if;
183187

184-
put(l_cur_item, ltrim(a_path, l_temp_root || '.'), a_suite);
188+
put(l_cur_item, trim_path(a_path, l_temp_root || '.'), a_suite);
185189

186190
if l_ind is null then
187191
a_root_suite.add_item(l_cur_item);
@@ -191,7 +195,7 @@ create or replace package body ut_suite_manager is
191195

192196
else
193197
a_root_suite := ut_test_suite(null, l_temp_root);
194-
put(a_root_suite, ltrim(a_path, l_temp_root || '.'), a_suite);
198+
put(a_root_suite, trim_path(a_path, l_temp_root || '.'), a_suite);
195199
end if;
196200
else
197201
if a_root_suite is not null then
@@ -247,7 +251,7 @@ create or replace package body ut_suite_manager is
247251

248252
if l_schema_suites.exists(l_root) then
249253
l_root_suite := l_schema_suites(l_root);
250-
l_path := ltrim(l_ind, l_root || '.');
254+
l_path := trim_path(l_ind, l_root || '.');
251255
else
252256
l_root_suite := null;
253257
l_path := l_ind;

0 commit comments

Comments
 (0)