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

Skip to content

Commit 18af6b0

Browse files
committed
Added test for including context when it only contains skipped tests
1 parent 3d38fbe commit 18af6b0

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

test/ut3_user/reporters/test_tap_reporter.pkb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ create or replace package body test_tap_reporter as
2020

2121
--%test(Escaped Comments)
2222
procedure escaped_comments;
23+
24+
--%context(Some context)
25+
26+
--%test(Another disabled test)
27+
--%disabled
28+
procedure another_disabled_test;
29+
30+
--%endcontext
2331
end test_tap_escaping;
2432
]';
2533

@@ -42,6 +50,11 @@ create or replace package body test_tap_reporter as
4250
dbms_output.put_line('This \ and # should not be escaped, and this not as well!!!');
4351
ut.expect(1).to_equal(1);
4452
end escaped_comments;
53+
54+
procedure another_disabled_test as
55+
begin
56+
ut.expect(10).to_equal(1);
57+
end;
4558
end test_tap_escaping;
4659
]';
4760

@@ -217,6 +230,21 @@ create or replace package body test_tap_reporter as
217230
end suitepath_as_chopped_subtests;
218231

219232

233+
procedure include_context_with_skipped_tests as
234+
l_output_data ut3_develop.ut_varchar2_list;
235+
l_expected varchar2(32767);
236+
begin
237+
l_expected := q'[%# Subtest: Some context%]';
238+
239+
select *
240+
bulk collect into l_output_data
241+
from table(ut3_develop.ut.run('test_tap_escaping.another_disabled_test',ut3_develop.ut_tap_reporter()));
242+
243+
ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_be_like(l_expected);
244+
245+
end include_context_with_skipped_tests;
246+
247+
220248
procedure drop_help_tests as
221249
pragma autonomous_transaction;
222250
begin

test/ut3_user/reporters/test_tap_reporter.pks

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ create or replace package test_tap_reporter as
4242
--%test(Suitepath as chopped subtests)
4343
procedure suitepath_as_chopped_subtests;
4444

45+
--%test(Include context with only skipped tests in output)
46+
procedure include_context_with_skipped_tests;
47+
4548

4649
--%afterall
4750
procedure drop_help_tests;

0 commit comments

Comments
 (0)