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

Skip to content
Prev Previous commit
Next Next commit
take into account utassert and utassert2 packages from migration project
  • Loading branch information
Pazus committed Jul 3, 2017
commit 01b59b4c26628e92a928f9a5c28e9cb51818d2b9
5 changes: 3 additions & 2 deletions source/core/ut_expectation_processor.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ create or replace package body ut_expectation_processor as
l_object_name varchar2(1000);
-- in 12.2 format_call_stack reportes not only package name, but also the procedure name
-- when 11g and 12c reports only package name
c_expectation_search_pattern constant varchar2(500) := '(.*\.UT_EXPECTATION_RESULT\s+)(.*\.UT_EXPECTATION[A-Z0-9#_$]*(\.[A-Za-z0-9$#_]+)?.*\s+)+(.*\.UT(\.FAIL)?\s+)?(.*)\s';
c_expectation_search_pattern constant varchar2(500) :=
'(.*\.UT_EXPECTATION_RESULT\s+)(.*\.UT_EXPECTATION[A-Z0-9#_$]*(\.[A-Za-z0-9$#_]+)?.*?)+(.*\.UT(\.FAIL)?\s+)?(.*\.UTASSERT2?(\.[A-Za-z0-9$#_]+)?.*?$\s+)*(.*?$)';
begin
l_caller_stack_line := regexp_substr( c_call_stack, c_expectation_search_pattern, 1, 1, 'm', 6);
l_caller_stack_line := regexp_substr( c_call_stack, c_expectation_search_pattern, 1, 1, 'mn', 8);
l_line_no := to_number( regexp_substr(l_caller_stack_line,'^\dx[0-9a-f]+\s+(\d+)',subexpression => 1) );
l_caller_type_and_name := substr( l_caller_stack_line, 23 );
if l_caller_stack_line like '%.%' then
Expand Down