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

Skip to content
Prev Previous commit
Next Next commit
fixed pattern for 11g and 12.1
  • Loading branch information
Pazus committed Jul 3, 2017
commit 953551c57f0b12728b5394a1aa896c01f573ce5e
4 changes: 2 additions & 2 deletions source/core/ut_expectation_processor.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ 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$#_]+)?.*\s+)+(.*\.UT(\.FAIL)?\s+)?(.*)\s';
begin
l_caller_stack_line := regexp_substr( c_call_stack, c_expectation_search_pattern, 1, 1, 'm', 5);
l_caller_stack_line := regexp_substr( c_call_stack, c_expectation_search_pattern, 1, 1, 'm', 6);
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