@@ -129,14 +129,15 @@ create or replace package body ut_expectation_processor as
129129 l_object_name varchar2(1000);
130130 -- in 12.2 format_call_stack reportes not only package name, but also the procedure name
131131 -- when 11g and 12c reports only package name
132- c_expectation_search_pattern constant varchar2(500) := '(.*\.UT_EXPECTATION_RESULT\s+)(.*\.UT_EXPECTATION[A-Z0-9#_$]*(\.[A-Za-z0-9$#_]+)?.*\s+)+(.*)\s';
132+ c_expectation_search_pattern constant varchar2(500) :=
133+ '(.*\.(UT_EXPECTATION[A-Z0-9#_$]*|UT|UTASSERT2?)(\.[A-Z0-9#_$]+)?\s+)+(.*)';
133134 begin
134135 l_caller_stack_line := regexp_substr( c_call_stack, c_expectation_search_pattern, 1, 1, 'm', 4);
135- l_line_no := to_number( regexp_substr(l_caller_stack_line,'^\dx [0-9a-f]+\s+(\d+)',subexpression => 1) );
136- l_caller_type_and_name := substr( l_caller_stack_line, 23 );
136+ l_line_no := to_number( regexp_substr(l_caller_stack_line,'0x [0-9a-f]+\s+(\d+)',subexpression => 1) );
137+ l_caller_type_and_name := trim(regexp_substr( l_caller_stack_line,'0x[0-9a-f]+\s+\d+\s+(.+)',subexpression => 1) );
137138 if l_caller_stack_line like '%.%' then
138- l_owner := regexp_substr(l_caller_stack_line,'\s ([A-Za-z0-9$#_]+)\.([A-Za-z0-9$#_]|\.)+$ ',subexpression => 1);
139- l_object_name := regexp_substr(l_caller_stack_line,'\s ([A-Za-z0-9$#_]+)\.(([A-Za-z0-9$#_]|\.)+)$ ',subexpression => 2);
139+ l_owner := regexp_substr(l_caller_stack_line,'([A-Za-z0-9$#_]+)\.([A-Za-z0-9$#_]|\.)+',subexpression => 1);
140+ l_object_name := regexp_substr(l_caller_stack_line,'([A-Za-z0-9$#_]+)\.(([A-Za-z0-9$#_]|\.)+)',subexpression => 2);
140141 end if;
141142 return
142143 case when l_owner is not null and l_object_name is not null and l_line_no is not null then
0 commit comments