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

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixes #891 - use to_match instead of to_be_like to avoid Oracle bug 1…
…4402514 on some 11.2.0.4 instances
  • Loading branch information
PhilippSalvisberg committed Apr 2, 2019
commit 675ba70f05ebd9ff367f85d6a27bf9459a628130
14 changes: 7 additions & 7 deletions test/core/test_suite_builder.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -608,11 +608,11 @@ create or replace package body test_suite_builder is
--Act
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
--Assert
ut.expect(l_actual).to_be_like('%<WARNINGS>%Annotation &quot;--\%beforeall&quot;%line 2%</WARNINGS>%', '\');
ut.expect(l_actual).to_be_like('%<WARNINGS>%Annotation &quot;--\%beforeeach&quot;%line 3%</WARNINGS>%', '\');
ut.expect(l_actual).to_be_like('%<WARNINGS>%Annotation &quot;--\%aftereach&quot;%line 4%</WARNINGS>%', '\');
ut.expect(l_actual).to_be_like('%<WARNINGS>%Annotation &quot;--\%afterall&quot; cannot be used with &quot;--\%test&quot;. Annotation ignored.'
||'%at &quot;UT3_TESTER.SOME_PACKAGE.DO_STUFF&quot;, line 5%</WARNINGS>%', '\');
ut.expect(l_actual).to_match('(.*)(<WARNINGS>)(.*)(Annotation &quot;--%beforeall&quot;)(.*)(line 2)(.*)(</WARNINGS>)(.*)', 'n');
ut.expect(l_actual).to_match('(.*)(<WARNINGS>)(.*)(Annotation &quot;--%beforeeach&quot;)(.*)(line 3)(.*)(</WARNINGS>)(.*)', 'n');
ut.expect(l_actual).to_match('(.*)(<WARNINGS>)(.*)(Annotation &quot;--%aftereach&quot;)(.*)(line 4)(.*)(</WARNINGS>)(.*)', 'n');
ut.expect(l_actual).to_match('(.*)(<WARNINGS>)(.*)(Annotation &quot;--%afterall&quot; cannot be used with &quot;--%test&quot;. Annotation ignored.)'
||'(.*)(at &quot;UT3_TESTER.SOME_PACKAGE.DO_STUFF&quot;, line 5)(.*)(</WARNINGS>)(.*)', 'n');
ut.expect(l_actual).not_to_be_like('%<BEFORE_EACH_LIST>%');
ut.expect(l_actual).not_to_be_like('%<AFTER_EACH_LIST>%');
ut.expect(l_actual).not_to_be_like('%<BEFORE_ALL_LIST>%');
Expand Down Expand Up @@ -1095,7 +1095,7 @@ create or replace package body test_suite_builder is
--Act
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
--Assert
ut.expect(l_actual).to_be_like('%<WARNINGS><VARCHAR2>Unsupported annotation &quot;--\%bad_procedure_annotation&quot;. Annotation ignored.% line 2</VARCHAR2></WARNINGS>%', '\');
ut.expect(l_actual).to_match('(.*)(<WARNINGS><VARCHAR2>Unsupported annotation &quot;--%bad_procedure_annotation&quot;\. Annotation ignored\.)(.*)( line 2</VARCHAR2></WARNINGS>)(.*)', 'n');
end;

procedure test_bad_package_annotation is
Expand All @@ -1111,7 +1111,7 @@ create or replace package body test_suite_builder is
--Act
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
--Assert
ut.expect(l_actual).to_be_like('%<WARNINGS><VARCHAR2>Unsupported annotation &quot;--\%bad_package_annotation&quot;. Annotation ignored.% line 17</VARCHAR2></WARNINGS>%', '\');
ut.expect(l_actual).to_match('(.*)(<WARNINGS><VARCHAR2>Unsupported annotation &quot;--%bad_package_annotation&quot;\. Annotation ignored\.)(.*)( line 17</VARCHAR2></WARNINGS>)(.*)', 'n');
end;

end test_suite_builder;
Expand Down