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

Skip to content

Commit f1c0f86

Browse files
committed
Included escaped skip reason
1 parent f18981d commit f1c0f86

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

source/reporters/ut_tap_reporter.tpb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ create or replace type body ut_tap_reporter is
5757
if a_test.result = ut_utils.gc_disabled then
5858
self.print_text('ok - ' || l_test_name || ' # SKIP'||
5959
case when a_test.disabled_reason is not null
60-
then ': '||a_test.disabled_reason
60+
then ': '|| self.escape_special_chars(a_test.disabled_reason)
6161
else null
6262
end );
6363
elsif a_test.result = ut_utils.gc_success then

test/ut3_user/reporters/test_tap_reporter.pkb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,20 @@ create or replace package body test_tap_reporter as
151151
end escape_multiple_characters_test_name;
152152

153153

154+
procedure special_characters_in_deisabled_reason as
155+
l_output_data ut3_develop.ut_varchar2_list;
156+
l_expected varchar2(32767);
157+
begin
158+
l_expected := q'[%ok - Disabled test # SKIP: With \\ and \# in skip reason%]';
159+
160+
select *
161+
bulk collect into l_output_data
162+
from table(ut3_develop.ut.run('test_tap_escaping.not_skipping_escapes',ut3_develop.ut_tap_reporter()));
163+
164+
ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_be_like(l_expected);
165+
end special_characters_in_deisabled_reason;
166+
167+
154168
procedure drop_help_tests as
155169
pragma autonomous_transaction;
156170
begin

test/ut3_user/reporters/test_tap_reporter.pks

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ create or replace package test_tap_reporter as
3030
--%test(Escape multiple special characters in test name)
3131
procedure escape_multiple_characters_test_name;
3232

33+
--%test(Disabled Test with special characters in disable reason)
34+
procedure special_characters_in_deisabled_reason;
35+
3336

3437
--%afterall
3538
procedure drop_help_tests;

0 commit comments

Comments
 (0)