Skip to content

Commit 641ef7d

Browse files
committed
Added failing test for TAP
1 parent 6f47bb9 commit 641ef7d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test/ut3_user/reporters/test_tap_reporter.pkb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,18 @@ create or replace package body test_tap_reporter as
1313
ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_match(l_expected);
1414
end simple_succeeding_test;
1515

16+
procedure simple_failing_test as
17+
l_output_data ut3_develop.ut_varchar2_list;
18+
l_expected varchar2(32767);
19+
begin
20+
l_expected := q'[TAP version 14\s*1..1\s*# Subtest: org\s{5}1..1\s{5}# Subtest: utplsql\s{9}1..1\s{9}# Subtest: tests\s{13}1..1\s{13}# Subtest: helpers\s{17}1..1\s{17}# Subtest: A suite for testing different outcomes from reporters\s*1..1\s*# <!beforeall!>\s*not ok - a test with failing assertion\s*---\s*message: '"Fails as values are different"'\s*severity: fail\s*...\s*# <!afterall!>\s*not ok - org\s*]';
21+
22+
select *
23+
bulk collect into l_output_data
24+
from table(ut3_develop.ut.run('test_reporters.failing_test',ut3_develop.ut_tap_reporter()));
25+
26+
ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_match(l_expected);
27+
end simple_failing_test;
28+
1629
end test_tap_reporter;
1730
/

test/ut3_user/reporters/test_tap_reporter.pks

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ create or replace package test_tap_reporter as
66
--%test(Simple succeeding test)
77
procedure simple_succeeding_test;
88

9+
--%test(Simple failing test)
10+
procedure simple_failing_test;
11+
912
end test_tap_reporter;
1013
/

0 commit comments

Comments
 (0)